Home > Web Front-end > JS Tutorial > body text

jQuery 1.2.x upgrade 1.3.x precautions_jquery

WBOY
Release: 2016-05-16 18:53:19
Original
1146 people have browsed it
1.Selector
Take the input tag name as the value of go
Copy the code The code is as follows:

$("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
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template