Javascript 如何得到input type="radio" 的值?
for example:
1-10 years old
11 years old
12-120 years old
This example uses script to detect which radio button the user selects.
function detect()
{
if (radio[0].checked)
alert("You're between 1 and 10 years old.")
else if (radio[1].checked)
alert("You're 11 years old.")
else
alert("You're between 12 and 120 years old.")
}
本文来源:https://www.2haoxitong.net/k/doc/d5c17d80a300a6c30d229f43.html
文档为doc格式