javascript - Adding attribute at runtime -


is possible add required attribute on runtime in textbox? want validation js n jquery. requirement can not hard code required attribute. need generate on runtime.

yes.

// set attribute jquery("#id_of_element").attr("my_attribute","value");  // attribute jquery("#id_of_element").attr("my_attribute"); 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -