We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
区别---两个对象完全不同
如何转化: DOM对象转jQuery对象 对于DOM对象,只需用 $() 把DOM对象包装起来,就可得到jQuery对象
var dom =document.getElementById("id"); // DOM对象 var $dom = $(dom); // jQuery对象
jQuery对象转成DOM对象: 有两种方法 [index] 和 .get(index)
var $dom = $("#id") ; // jQuery对象 var dom = $dom [0]; // DOM对象
var $dom = $("#id"); // jQuery对象 var dom = $dom.get(0); // DOM对象
The text was updated successfully, but these errors were encountered:
No branches or pull requests
区别---两个对象完全不同
如何转化:
DOM对象转jQuery对象
对于DOM对象,只需用 $() 把DOM对象包装起来,就可得到jQuery对象
jQuery对象转成DOM对象:
有两种方法 [index] 和 .get(index)
The text was updated successfully, but these errors were encountered: