开发者

How to reach javascript object property

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?


Is this OK?

document.getElementsByName('params[menu_images]')

You can also iterate over document.adminForm.elements to find your form element...


document.getElementById('paramsmenu_images0') will give you the dom element if that's what you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜