<html>
<head>
<title>械</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<script type="text/javascript" src="jquery-1.4.js"></script>
<script type="text/javascript">
$(function (){
if ($.browser.msie) { //如果选择了A,一直点A会触发事件吗
$(":radio").click(function(){ //此处用click 不用change
var str=$("input[type=radio][checked]").val();
// alert(str);
if(str=='male'){
alert('male');
}else{
alert('不是我');
}
});
}
});
</script>
</head>
<body>
jquery 取radion 的值:
<form>
<input type="radio" name="sex" id="sex" value="male" /> Male
<br />
<input type="radio" name="sex" id="sex" value="female" /> Female
</form>
</body>
</html>