Reputation: 3280
I have some radio buttons like to
<input type="radio" checked="checked" value="0" id="paramsmenu_images0" name="params[menu_images]">
I would like to reach this in javascript somehow like this:
console.log(document.adminForm.params[menu_images]);
Of course it doesn't work, so how can I reach it?
Upvotes: 0
Views: 195
Reputation: 185873
Is this OK?
document.getElementsByName('params[menu_images]')
You can also iterate over document.adminForm.elements
to find your form element...
Upvotes: 1
Reputation: 32335
document.getElementById('paramsmenu_images0')
will give you the dom element if that's what you want.
Upvotes: 0