<input type="text" name="aa" id="aa" onclick="doClick()"/>
方法1:
<script> function doClick() { var element = document.getElementByName("aa").value; } </script>
方法2:
<script> function doClick() { var element = document.getElementById("aa").value; } </script>
方法3:
<script> function doClick() { var element = $("#aa").val(); } </script>