0
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);
        }
    }
}

console:

#text  
INPUT  
null  
#text  
IMG  
#text 
BUTTON
#text

why null?

Barmar
  • 741,623
  • 53
  • 500
  • 612

0 Answers0