How to get the contents of an input box using JavaScript?

Q

How to get the contents of an input box using JavaScript?

✍: Guest

A

Use the "value" property of the input box object. For example:
var myValue = window.document.getElementById("MyTextBox").value;

2008-08-12, 4961👍, 0💬