html - Select an element without ID in JavaScript -
this question has answer here:
- how access html element without id? 6 answers
i'm having little problem changing value of textbot. problem there no id assigned textbox, getelementbyid not work, neither getelementsbyname.
<input type="text" class="textbox" name="custom_reason" size="50" maxlength="120" value=""> how change it's value?
thank you.
you may use name instead:
var x = document.getelementsbyname("custom_reason")[0];
Comments
Post a Comment