例子:
var temp=document.getElementsByTagName("input");
for (i = 0; i < temp.length; i++) {
if (temp[i].id != "" && temp[i].id!=null) {
document.getElementById(temp[i].id).value = "";
}
}
getElementsByTagName获取的是数组