当前位置: 首页 > 工具软件 > ZBOX > 使用案例 >

zbox的测试例——selectAll+selectInverse

班承德
2023-12-01

将对应的js文件放入同一路径后,即可测试此例。

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<div style="position: absolute;margin: 200px;">
    <input type="checkbox" id="radio0" group="sAll"><label for="radio0">全选</label><br><br>
    <input type="checkbox" id="radio-1" group="sInverse"><label for="radio-1">反选</label><br><br>
    <input type="checkbox" id="radio1" group="sRadio"><label for="radio1">选项1</label><br><br>
    <input type="checkbox" id="radio2" group="sRadio"><label for="radio2">选项2</label><br><br>
    <input type="checkbox" id="radio3" group="sRadio"><label for="radio3">选项3</label><br><br>
    <input type="checkbox" id="radio4" group="sRadio"><label for="radio4">选项4</label><br><br>
    <input type="checkbox" id="radio5" group="sRadio"><label for="radio5">选项5</label>

</div>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="jquery.zbox.js"></script>
<script>
    $(function () {
        $.zbox.selectAll("[group='sAll']", "[group='sRadio']");
        $.zbox.selectInverse("[group='sInverse']", "[group='sRadio']","[group='sAll']");
    });
</script>
</body>
</html>
 类似资料: