<script>
function validate(chk){
if (chk.checked == 1)
document.getElementById('Texttoshow').style.display="block";
else
alert("You didn't check it! Let me check it for you.")
chk.checked = 1;
}
</script>
<input type="text" value="hey" style="display:none"><input oncheck="validate(this.id)" type="check">
出力:のdocument.getElementById( 'Texttoshow')がNULLである要素を表示する場合、「チェックボックス」チェックボックスがオンになっているかどうかを確認するにはどうすればよいでしょうか?
This code will check if Checkbox is checked and if so, it will show the CSS Hidden Textbox. How do I make it so it will Do so in that manner?
初期の質問ではありませんが、更新点+1 –