You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.【jQuery实现的效果】如果没有指定context参数,$()将在当前的 HTML document中查找 DOM 元素;如果指定了 context 参数,如一个 DOM 元素集或 jQuery 对象,那就会在这个 context 中查找。context: 作为待查找的 DOM 元素集、文档或 jQuery 对象。
在文档的第一个表单中,查找所有的单选按钮(即: type 值为 radio 的 input 元素)。
$("input:radio",document.forms[0]);
在一个由 AJAX 返回的 XML 文档中,查找所有的 div 元素。
$("div",xml.responseXML);
The text was updated successfully, but these errors were encountered:
jaywcjlove
changed the title
$(selector, context) 实现
$([selector,[context]])实现
Mar 19, 2015
1.【zepto实现的效果】创建带有属性的元素
2.【jQuery实现的效果】如果没有指定context参数,$()将在当前的 HTML document中查找 DOM 元素;如果指定了 context 参数,如一个 DOM 元素集或 jQuery 对象,那就会在这个 context 中查找。context: 作为待查找的 DOM 元素集、文档或 jQuery 对象。
The text was updated successfully, but these errors were encountered: