1.Selector Take the input tag name as the value of go
$("input[@name=go]").val(); //Originally this was feasible on jQuery 1.2.x'
$("input[name=tag] ").val(); //But after 1.3.x, @ must be removed, otherwise an error will occur
Any other @ originally added must be removed, like [@selected][@checked] etc.
p.s
[attribute]: There is a specified attribute
[attribute=value]: The attribute value is value
[attribute!=value]: The attribute value does not contain value
[attribute^ =value] : The string at the beginning of the attribute is value
[attribute$=value] : The string at the end of the attribute is value
[attribute*=value] : The attribute value contains value
remark: [attribute=value] It looks very similar to [attribute*=value], but there are still differences
One is completely consistent, and the other is included. I saw someone writing that the latter is multiple, which should be incorrect
remark :
I don’t know why when using [name='test'], it’s ok if it’s all span
But if there is
or input, only this one will be found
Also
$("XmlParentNode ) .xx will find the right one
References:
3 Quick Steps for a Painless Upgrade to jQuery 1.3