So I\'m learning to manipulate the DOM and I noticed one interesting thing:
Let\'s say I want to set the name attribute of an element by using the \".\"
when you use, element.name, you are accessing the property/creating a property named "name" and setting its value.
but,
while using, element.setAttribute('name','someName'), you are actually setting the attribute 'name'.
IE8 and below treats the property and attribute as same, the bug has been fixed in IE9 and above.
Safari, FireFox, Chrome treat property and attribute differently.
However, you can always create a new property of your choice if you wish to do so.