چک باکس: <input type="checkbox" id="myCheck" onclick="sevenhost()">
<p id="text" style="display:none">تیک چک باکس خورده</p>
body{
direction: rtl;
font-family: tahoma
}
function sevenhost() {
// Get the checkbox
var checkBox = document.getElementById("myCheck");
// Get the output text
var text = document.getElementById("text");
// If the checkbox is checked, display the output text
if (checkBox.checked == true){
text.style.display = "block";
} else {
text.style.display = "none";
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.