Javascript examples for DOM HTML Element:Input Button
Add text to a textbox by clicking a button
<html> <head> <script> function ButtonClick_Test()// www . j a v a 2s . c om { document.getElementById("result").value= ' your text here'; } </script> </head> <body> <form> Click Here: <br> <input type="button" value="Click Here" name="no" onclick="ButtonClick_Test()"> <input type="text" id="result" size="20"> </form> </body> </html>