Lets say I have an element like this:
<input id="options_14_text" type="text" onchange="something()" name="options[14]" value="">
How could I change its id to options_15_text for example using Prototype?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can select the element and then change its
idproperty:Or you could use
writeAttribute:Here’s a working example. Inspect the DOM to see that the
idvalue has changed.