<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="js/jquery-1.4.2.min.js"></script>
<script>
$(function(){
$('.radio').toggle(function() {
$(this).attr('checked', true);
}, function() {
$(this).attr('checked', false);
});
})
</script>
</head>
<body>
<input type="radio" class="radio" name="radio">
</body>
</html>
为什么这样写点击radio会没有反应
应该是
checkbox
吧