1.Selector
Take the input tag name as go value
Copy Code code as follows:
$ ("input[@name =go]"). Val (); It was supposed to be available on JQuery 1.2.x.
$ ("Input[name=tag]"). Val (); But after 1.3.x, take the @ off, or it will be wrong.
Others have to be removed, such as [@selected] [@checked]
P.s
[attribute]: having the specified attributes
[Attribute=value]: The value of the metal
[Attribute!=value]: The value of the metal does not contain
[Attribute^=value]: The name of the word string is value
[Attribute$=value]: The character end word string value
[Attribute*=value]: The metal value includes value
Remark: [Attribute=value] and [attribute*=value] look alike, but there are still different
One is exactly the same, one is included, there are people who have been written to take many, and should be incorrect
Remark:
I don't know why [name= ' test '], if all spans are OK
But if you have a <a name=test> or input, you'll only find this one.
Other than that
$ ("Xmlparentnode xmlchildnode[name= ' xx ')"). XX <== This looks like it's going to look wrong.
$ ("Xmlparentnode"). Find ("Xmlchildnode[name= ' xx ')"). XX will be right.
References:
3 Quick Steps for a painless Upgrade to jQuery 1.3