jquery common Tag Records a,jquery finds by Name property
$ ("Div[id]") Select all DIV elements that contain the id attribute
$ ("Input[name= ' keleyicom ')" selects all the name attributes equal to the INPUT element of ' keleyicom '
$ ("input[name!= ' keleyicom ')" selects all the name attribute not equal to ' keleyicom ' INPUT element
$ ("input[name^= ' keleyi ')" selects all the name attributes with the INPUT element beginning with ' keleyi '
$ ("input[name$= ' keleyi ')" selects all the name attributes with the INPUT element ending with ' keleyi '
$ ("input[name*= ' keleyi ')" selects all the name attributes that contain the ' keleyi ' INPUT element
$ ("input[id][name$= ' keleyi ')") can use multiple attributes for federated selection, which is to get all the elements that contain the id attribute and then the property ends with Keleyi
Value by name:
$ ("Input[name= ' mobile ']"). Val ()
two,value based on ID:
$ ("#mobile_reg_form"). HTML ()
The traversal is evaluated by name:
$ ("Input[name= ' mobile ']"). each (
function () {
Consol.info ($ (this). Val ());
}
)
three,remove input from the form:
<script type= "Text/javascript" language= "JavaScript" charset= "UTF-8" >
$ (document). Ready (function () {
var a= $ ("form input");
$. Each (A, function (Name,object) {
Consol.info (name+ ":" + $ (object). val ());
}
);
});
</script>
To get a value (multiple cases):
$ ("Input[name= ' mobile ']") [0].value
$ ("Input[name= ' mobile ']"). Get (1). Value
Four,jquery Add Delete style
To add a style to a label:
$ ("#id"). AddClass ("style");
Delete a label's style:
$ ("#id"). Removeclass ("style");
Note: the "#id" ID is the corresponding label of the Id,style is the name of the corresponding CSS style
Get the selected value from the Radio tab
$ ("Input[name= ' xxxx ']:checked"