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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -