Forum Moderators: open

Message Too Old, No Replies

Directly add an attribute as an element property

         

Rain_Lover

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

10+ Year Member Top Contributors Of The Month



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?

Fotiman

3:21 pm on Feb 14, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes.

Rain_Lover

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

10+ Year Member Top Contributors Of The Month



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