问题:勾选复选框后点击选择按钮实现弹出框出现你“选中了‘复选框后的文字’”。
代码:
```html
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./script/jquery-3.6.0.min.js"></script>
<script>
$(function(){
var $inputs = $('input');
console.log($inputs);
var $btn = $('$btn');
var btn = $btn[0];
btn.onclick =function(){
}
})
</script>
</head>
<body>
<label for="id1">
<input type="checkbox">王者
</label>
<label for="id2">
<input type="checkbox">NBA
</label>
<label for="id3">
<input type="checkbox">LPL
</label>
<label for="id4">
<input type="checkbox">华为
</label>
<label for="id5">
<input type="checkbox">小米
</label>
<label for="id6">
<input type="checkbox">苹果
</label>
<label for="id7">
<input type="checkbox">vivo
</label>
<label for="id8">
<input type="checkbox">荣耀
</label>
<br>
<button id="btn">选择</button>
</body>