The example in this article describes how jquery obtains values from the form name. Share to everyone for your reference, specific as follows:
Value by name:
$ ("Input[name= ' mobile ']"). Val ()
Value by ID:
$ ("#mobile_reg_form"). HTML ()
Traverse by Name Value:
$ ("Input[name= ' mobile ']"). each (
function () {
alert ($ (this). Val ());
}
)
Remove input from form:
<script type= "Text/javascript" language= "JavaScript" charset= "UTF-8" >
$ (document). Ready (function () {
var a=$ ("form input");
$.each (
A,
function (name,object) {
alert (name+ ":" +$ (Object). Val ())
;}); </script>
Get a value (multiple cases):
$ ("Input[name= ' mobile ']") [0].value
$ ("Input[name= ' mobile ']"). Get (1). Value
jquery Add Delete style
To add a style to a label:
$ ("#id"). AddClass ("style");
To delete a label's style:
$ ("#id"). Removeclass ("style");
Note: the "#id" ID is the corresponding label Id,style is the name of the corresponding CSS style
More interested readers of jquery-related content can view the site's topics: A summary of Ajax usage in jquery, a summary of jquery table (table) operations tips, a summary of jquery drag-and-drop effects and techniques, a summary of jquery extension techniques, jquery Common Classic Effects Summary "jquery animation and special effects usage Summary", "jquery selector usage Summary" and "jquery common Plug-ins and Usage summary"
I hope this article will help you with the jquery program design.