1. JavaScript access DOM object method :
var oTxtValue=document.getElementById("Text1").value;
2. JQuery access DOM object method :
var oTxtValue=$("#Text1").val();
Accessing or controlling elements in the page through methods in the JQuery library is much simpler than using JavaScript code and is compatible with various browsers.
Sample code:
Controlling DOM objects < ;META NAME="Generator" CONTENT="EditPlus">
< /HEAD>
< /div>
Rendering: