高分求翻译,懂jquery的进!

高分求翻译,懂jquery的进!
The Wrong Ways
But I get the feeling that a few less experienced jQuery users are referencing jQuery like this:
http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js
Notice the less specific version number — “1.7″ instead of “1.7.2″.
Or, even worse:
http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
Notice the whole version number — “1″ instead of “1.7″ or “1.7.2″.
Or, worst of all:
http://code.jquery.com/jquery-latest.js
Notice no version number, just a plain reference to the “latest” version, whatever that might be.
So why is it wrong to link to jQuery using one of those last three methods? And is it ever right to do that?
带眼镜的猴子 1年前 已收到1个回答 举报

林箫浪云 幼苗

共回答了16个问题采纳率:93.8% 举报

错误的方法
我觉得,一些没有经验的jQuery使用者会像这样引用jQuery:
http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js
注意,版本号的短缺: 用了1.7而不是1.7.2
更有甚者,用
http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
注意:全部的版本号是1而不是1.7或1.7.2
最糟糕的是,
http://code.jquery.com/jquery-latest.js
没有版本号,根本没管应该是什么版本,就一个简单的对 “latest”版本的引用。
为什么用这三种方法链接jQuery会错呢? 这样做曾经正确过吗?

1年前

10
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.012 s. - webmaster@yulucn.com