<INPUT id="chk_other_MainContent" onclick="if(this.checked){ document.getElementById('other_MainContent').style.display='false' } else { document.getElementById('other_MainContent').style.display='true' }"type="checkbox" value="8" name="chk_other_MainContent"> 其它事由<div id="other_MainContent" style="DISPLAY: none"><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT><br>
填写其它事由<br>
<textarea name="other_MainContent" rows="3" cols="50"></textarea>
</div>这样,我选中复选框后,怎么没反应呢

解决方案 »

  1.   

    <INPUT id="chk_other_MainContent" onclick="if(this.checked){ document.getElementById('other_MainContent').style.display='false' } else { document.getElementById('other_MainContent').style.display='true' }"type="checkbox" value="8" name="chk_other_MainContent"> 改成<input id="chk_other_MainContent" onclick="if(this.checked){ document.getElementById('other_MainContent').style.display='' } else { document.getElementById('other_MainContent').style.display='none' }"
            type="checkbox" value="8" name="chk_other_MainContent">这样试试