function chkFormular(form)
{
var i;
for (i = 0; i < form.childNodes.length; i++)
{
console.log(form.childNodes[i].nodeName);
if(form.childNodes[i].nodeName == "INPUT")
{
console.log(form.childNodes[i].nodeValue);
}
}
}
控制台:
#text
INPUT
null
#text
IMG
#text
BUTTON
#text
为什么是空的?