<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')爲空我該如何檢查是否也檢查「複選框」是否被選中,如果是show元素?
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 – 2011-02-24 06:25:21