If you have a textbox, then you can get the value of the textbox or you can set the value of the textbox using JQuery.
Example:
Lets say you have a textbox like below
JQuery code to get textbox value
Javascript code to get textbox value
JQuery code to set textbox value
Example:
Lets say you have a textbox like below
First Name:<input type="text" id="txtFirstName" />
JQuery code to get textbox value
var value=$('#txtFirstName').val();
Javascript code to get textbox value
var Firstname = document.getElementById('txtFirstName').value;
JQuery code to set textbox value
$('#txtFirstName').val("your name");
Javascript code to to set textbox value
document.getElementById('txtFirstName').value = "your name";
In this way you can set/get textbox value using jquery/javascript.
For more posts on Javascript/JQuery visit: jquery
Both Java and JavaScript are commonly used web technologies. The similarities between their names often make beginners feel that JavaScript and Java are related.
ReplyDeleteFor more information: javascript
Thanks a lot man it was so helpful :)
ReplyDeleteYou are welcome Chriss. Glad it helped you.
ReplyDelete