代码
<!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=utf-8" />
<title>无标题文档</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(
function(){
    
//默认选中第一个radio按钮
    //第一种方式:
    //$(":radio").get(0).checked=true;
    //第二种方式:
      $($("input[name='Evaluation']").get(0)).attr("checked"true);
    
    
//单击事件,得到选中的radio按钮的值
    $('#submit').bind("click",function(){
        alert($(
"input[name='Evaluation']:checked").val());
    });
  });


</script>
</head>
<body>
<input name="Evaluation" type="radio"  value="11" />11
<br />
<input name="Evaluation" type="radio"  value="22" />22
<br />
<input name="Evaluation" type="radio"value="33" />33
<input type="button"  id="submit" value="提交" />
<br />
</body>
</html>

 

相关文章:

  • 2021-11-28
  • 2022-12-23
  • 2022-02-27
  • 2021-10-27
  • 2022-02-23
猜你喜欢
  • 2022-01-16
  • 2021-12-26
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
相关资源
相似解决方案