JSȡڵֵӼԪصķ

JSȡڵֵӼԪصķ

jQuery.siblings(),ֵܽýڵ㣬ǰ

var chils= s.childNodes; //õsȫӽڵ

if(elem_child[i].nodeName == text && !/\s/.test(elem_child.nodeValue))

jQuery.parent(expr) Ҹ׽ڵ㣬Դexprˣ$(span).parent()$(span).parent(.class)

˵һJSĻȡҪJQUERYķܶ࣬JQUERYķԱȡ

test() ڼһַǷƥijģʽ.�ǣ RegExpObject.test(string)

var s= document.getElementById(test);

֮ڵӣ֣֮ǰĺѿոһ¾Ϳ

for(var i=0; ielem_child.length;i++)

var ps=s.previousSbiling; //õsһֵܽڵ

var b =document.getElementById(test).childNodes;

ԣڴˣǾҪˣԪأԪΪոıɾ

jQuery.parents(expr),jQuery.parents(expr),DzԪأڸԪ

ϵվͼͶ߽Ͷ

ԭJSȡIDΪtestԪԪءã

var fc=s.firstChild; //sĵһӽڵ

var a = docuemnt.getElementById(test).getElementsByTagName(div); û

ַ string RegExpObject ƥı? true? false

nodeNamesԵõһڵĽڵͣ/\s/ǷǿַJSʽǰӣ,ʾǿַ

JSķJQUERYܶ࣬ҪΪFFFFĻҲDOMԪ

jQuery.next(),һֵܽڵ㣬ֵܽڵ

var ns=s.nextSbiling; //sһֵܽڵ

jQuery.find(expr),jQuery.filter(expr)ȫһjQuery.filter()ǴӳʼjQuery?ɸѡһ֣jQuery.find()ķؽʼݣ$(p),find(span),ǴpԪؿʼspan,ͬ$(p span)

jQuery.children(expr).ӽڵ㣬ֱֻ᷵ӵĺӽڵ㣬᷵ڵ

ԪأԪڵııͽڵĽڵֵǿյġͰɾ

ʱb.length IEû⣬ɵ2FFʹ4ΪFFѻҲһԪˡ

jQuery.prev()һֵܽڵ㣬ֵܽڵ

Leave a Comment