0
I want to add a javascript inside an HTML created.
<select name="testSelect">
<optgroup label="opt1">
<option value="3">Apples</option>
</optgroup>
<optgroup label="opt2">
</optgroup>
</select>
In this example I want to add the option inside the opt2 label. Something like this but inside the optgroup.
$("testSelect").set("value", 1);
$("testSelect").set("text", teste);
Add how? By clicking a button? By loading the page? By loading another element?
– ShutUpMagda