2012-11-25 27 views

回答

0

這是它:

<html> 
<head> 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> 
    <script type="text/javascript"> 
     $(document).ready(function() { 
      $("#le_button").click(function() { 
       var input_value = $("#le_input").val(); //get the value 
       alert(input_value); //do what ever you want, it is on a variable 
      }); 
    }); 
    </script> 
</head> 
<body> 

<textarea id="le_input">lorem ipsum</textarea> 
<button id="le_button">click me!</button> 

</body> 
</html> 
0

你的意思是? $('#id_of_or_input').val()

+0

是該做的,謝謝 – Deprecated

相關問題