判断radio是否被选中
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script>
function check()
{
for(var i=0;i<document.frm.major.length;i++)
{
if(document.frm.major[i].checked!=true)
{
alert('学历还没选择,请选择!');
}
}
}
</script>
<body>
<form name="frm">
<input type="radio" name="major" value="专科" />专科<input type="radio" name="major" value="本科" />本科<input type="radio" name="major" value="硕士研究生" />硕士研究生<br />
<input type="submit" onclick="check()" />
</form>
</body>
</html>
怎么判别不了呢?求解中。。。。。