本身封裝函數node
function getElementsByName(node, tag,eltname){函數
var elts=node.getElementsByTagName(tag);element
var count=0;get
var elements=[];io
for(var i=0;i<elts.length;i++){function
if(elts[i].getAttribute("name") == eltname){co
elements[count++]=elts[i];封裝函數
}return
}封裝
return elements;
}