Welcome to WebmasterWorld Guest from 54.158.195.220

Forum Moderators: open

Message Too Old, No Replies

Directly add an attribute as an element property

     
2:02 pm on Feb 14, 2014 (gmt 0)

Junior Member

5+ Year Member Top Contributors Of The Month

joined:Mar 1, 2010
posts: 194
votes: 0


Here's how I change the value of an existing attribute:

element.attribute = "value"


But is it OK to use the above method to create a new attribute?
3:21 pm on Feb 14, 2014 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 17, 2005
posts: 4987
votes: 12


Yes.
5:03 pm on Feb 14, 2014 (gmt 0)

Junior Member

5+ Year Member Top Contributors Of The Month

joined:Mar 1, 2010
posts: 194
votes: 0


Thanks for the confirmation! :)
Just wanted to make sure.