parent
65a63252d3
commit
9439fbfb4f
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"liveServer.settings.port": 5501
|
||||||
|
}
|
@ -1,59 +1,31 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<title>Untitled</title>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
<style>
|
||||||
|
.parent {
|
||||||
|
width: 500px;
|
||||||
|
height: 500px;
|
||||||
|
border: 1px solid red;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.child {
|
||||||
|
width: 100px;
|
||||||
|
height: 100px;
|
||||||
|
border: 1px solid red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
<div class="parent">
|
||||||
|
<div class="child">1</div>
|
||||||
<label>AAAA</label>
|
<div class="child">2</div>
|
||||||
|
<div class="child">3</div>
|
||||||
a<input name="options" value="A" type="checkbox">
|
</div>
|
||||||
|
|
||||||
b<input name="options" value="B" type="checkbox">
|
|
||||||
c<input name="options" value="C" type="checkbox">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script src="../js/jquery.min.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('input[type="checkbox"]').change(function () {
|
|
||||||
console.log("123123");
|
|
||||||
// $('input[type="checkbox"]').each(function () {
|
|
||||||
// if (this.checked) {
|
|
||||||
// console.log(this.value);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// if ($(this).is(':checked')) {
|
|
||||||
// console.log("123123");
|
|
||||||
// // 如果复选框被选中,则获取它的值并处理
|
|
||||||
// var value = $(this).val();
|
|
||||||
// // 处理复选框选中的值
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
Reference in new issue