标签:os io for ar cti html amp htm
function check()
{
var radionum=0;
var a = document.getElementsByTagName("input");
for (var i=0; i<a.length; i++){
if ((a[i].type == "radio")&&(a[i].checked))
radionum++;
}
if (radionum==0)
{
alert(‘you must choose one.‘);
return false;
}
return true;
}
---------------------------------------------------------------
getElementsByTagName根据html标记获取相应对象
标签:os io for ar cti html amp htm
原文地址:http://www.cnblogs.com/ganymede/p/3922408.html