I need to change a “for” label from an extension using javascript. I am unsure how to do this.
Thank in advance for the help!
<input id="theCheckboxId" type="checkbox" name="theCheckBoxName" />
<label for="theCheckBox">The text I want to change</label>
DEMO
First give the label an id
then do
EDIT
Wait, did you want to change the
forvalue, or change the actual text of the label? In any event, here’s how you would change the text: