javascript - InnerHTML getting Div Name -


i trying name of div

<div id="test" name="info1" onclick="func(this.name)">this div 1</div> 

but when try print out name of div using innerhtml comes undefined. can done or doing wrong?

according w3schools div cannot have name attribute, can have id, class or title. think dom isn't recognising attribute, therefore not making available javascript.

i made example here shows title working , name failing describe.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -