Old Geezer Old Geezer - 1 year ago 111
Javascript Question

Unable to get the NAME property from the DOM

I am unable to get the

attribute directly as a property of a DOM object.

As seen from a screenshot of Chrome Developer Tools, there is no property called
for a typical

enter image description here

Am I missing something basic?

Answer Source

You can use element.getAttribute('name') and it will return value of name attribute from any elements.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download