The following code creates a form with a textbox
<form>
First name: <input type="text" name="FirstName" id="firstName"><br>
Last name: <input type="text" name="LastName" id="lastName"><br>
<input type="submit" value="Submit">
</form>
<body>
</html>
To access textbox using jquery ,following is the way
<html>
<body><form>
First name: <input type="text" name="FirstName" id="firstName"><br>
Last name: <input type="text" name="LastName" id="lastName"><br>
<input type="submit" value="Submit">
</form>
<body>
</html>
To access textbox using jquery ,following is the way
var firstName= $('#
firstName
').val(); //
$("#
firstName
").val("someValue")
//Is used to set the value of textbox
No comments:
Post a Comment