In JavaScript, how can I get all radio buttons in the page with a given name?

Like the title says, what's the best way in [JavaScript][1] to get all radio buttons on a page with a given name? Ultimately I will use this to determine which specific radio button is selected, so another way to phrase the question: Given a string variable in JavaScript, how can I tell which exact radio button input element (if any) with that string as it's name is currently selected? I'm _not_ using jQuery. If you want to provide a jQuery answer, go ahead. Someone else might find it useful. But it won't help me and I won't upvote it. [1]: http://en.wikipedia.org/wiki/JavaScript
I know it is. I've written about it at length: stackoverflow.com/questions/148670/… But it's not up to me.

以上就是In JavaScript, how can I get all radio buttons in the page with a given name?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏