<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