homepage Welcome to WebmasterWorld Guest from 54.204.182.118
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Directly add an attribute as an element property
Rain_Lover



 
Msg#: 4645225 posted 2:02 pm on Feb 14, 2014 (gmt 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?

 

Fotiman

WebmasterWorld Senior Member fotiman us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4645225 posted 3:21 pm on Feb 14, 2014 (gmt 0)

Yes.

Rain_Lover



 
Msg#: 4645225 posted 5:03 pm on Feb 14, 2014 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved