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++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -