DEVFYI - Developer Resource - FYI

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

JavaScript Interview Questions and Answers


(Continued from previous question...)

40. How to get the contents of an input box using Javascript?

Use the "value" property.
var myValue = window.document.getElementById("MyTextBox").value;

(Continued on next question...)

Other Interview Questions