Created
September 6, 2020 18:51
-
-
Save weepjp/8a1f1db29c6936f6b91489c95dc66970 to your computer and use it in GitHub Desktop.
test chk8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>test chk8</title> | |
<script> | |
function chk( obj,id ) { | |
if( !obj.checked ){ | |
document.getElementById(id).style.display = "none"; | |
} | |
else { | |
document.getElementById(id).style.display = "inline"; | |
} | |
} | |
</script> | |
<style> | |
#test{ | |
width:300px; border-radius:3px; border:3px solid #888; padding:10px; user-select: all; | |
} | |
</style> | |
</head><body> | |
<input type="checkbox" id="c1" onclick="chk(this,'a1')" checked="checked" /><label for="c1">1</label><br /> | |
<input type="checkbox" id="c2" onclick="chk(this,'a2')" checked="checked" /><label for="c2">2</label><br /> | |
<input type="checkbox" id="c3" onclick="chk(this,'a3')" checked="checked" /><label for="c3">3</label><br /> | |
<input type="checkbox" id="c4" onclick="chk(this,'a4')" checked="checked" /><label for="c4">4</label><br /> | |
<input type="checkbox" id="c5" onclick="chk(this,'a5')" checked="checked" /><label for="c1">5</label><br /> | |
<input type="checkbox" id="c6" onclick="chk(this,'a6')" checked="checked" /><label for="c2">6</label><br /> | |
<input type="checkbox" id="c7" onclick="chk(this,'a7')" checked="checked" /><label for="c3">7</label><br /> | |
<input type="checkbox" id="c8" onclick="chk(this,'a8')" checked="checked" /><label for="c4">8</label><br /> | |
<div id="test"> | |
<span id="a1">1</span><span id="a2">2</span><span id="a3">3</span><span id="a4">4</span><span id="a5">5</span><span id="a6">6</span><span id="a7">7</span><span id="a8">8</span> | |
</div> | |
</body></html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment