开发者

jQuery getting value of selected radio option

开发者 https://www.devze.com 2023-04-04 19:46 出处:网络
I have a form with several fields, and I use the following to get the value of the fields $(\"input[na开发者_开发技巧me=\'numbers\']\").val()

I have a form with several fields, and I use the following to get the value of the fields

$("input[na开发者_开发技巧me='numbers']").val()

However this doesn't work for radio options, it just comes back with undefined. How should I get the value of a selected radio option?


The :input selector can be used to input elements.

0

精彩评论

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