You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
610 B
27 lines
610 B
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<title>Untitled</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
Hello World!<input type="checkbox" id="myCheckbox">
|
|
|
|
<script src="http://cdn.jsdelivr.net/jquery/2.0.0/jquery-2.0.0.min.js"></script>
|
|
<script>
|
|
$(function(){
|
|
$('input[type="checkbox"]').click(function () {
|
|
if ($(this).is(":checked")) {
|
|
console.log("checkbox选中");
|
|
} else {
|
|
console.log("checkbox取消选中");
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|