Javascript examples for DOM HTML Element:Input Text
pass html input textbox value to a javascript function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <input type="text" id="myId"> /* w ww.jav a 2 s. c o m*/ <input type="button" value="search" class="p-userButton" onClick="showTable(document.getElementById('myId').value);"> <script type="text/javascript"> function showTable(val){ console.log(val) ; } </script> </body> </html>