HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
jQuery HTML/CSS Methods : Set the value of the <input> field
The val() method returns or sets the value attribute of the selected elements.
Return the value attribute:
Set the value attribute:
Set the value attribute using a function:
Parameter | Description |
---|---|
value | Required. Specifies the value of the value attribute |
function(index,currentvalue) | Optional. Specifies a function that returns the value to set.
|