Reputation: 542
I have a form created in php and I want to add some attributes to it from js dojo.
I can retrive the textfield by it's id (dojo.byId), but how to add the placeholder attribute to the node without creating a new one and replacing the previous field?
Upvotes: 1
Views: 124
Reputation: 7352
dojo.byId("textbox1").placeholder = "I'm your placeholder";
See it in action: http://jsfiddle.net/phusick/ww98a/
Upvotes: 2