Is there an easy way to convert jQuery code to regular javascript? I guess without having to access or understand the jQuery source code.
Is there an easy way to convert jQuery code to regular javascript? I guess without having to access or understand the jQuery source code.
最简单的方法就是学习如何使用普通的DOM api(您可能会称之为:普通JavaScript)进行DOM遍历和操作.
然而,对于某些事情来说,这可能是一种痛苦.(这就是图书馆最初被发明的原因).
在谷歌上搜索"javascript DOM遍历/操作"应该会为您提供大量有用的(和一些不太有用的)资源.
The articles on this website are pretty good: http://www.htmlgoodies.com/primers/jsp/
And as Nosredna points out in the comments: be sure to test in all browsers, because now jQuery won't be handling the inconsistencies for you.