日期:2014-05-16 浏览次数:20421 次
<INPUT name="checkboxN" id="checkboxN" value="1" type="checkbox" onclick="dis()"> <script> function dis() { var obj=document.getElementById("checkboxN"); if (obj.checked) document.getElementById("saveSearchIdd").style.display="block"; else document.getElementById("saveSearchIdd").style.display="none"; } </script>
------解决方案--------------------
<script language="javascript" type="text/javascript" src="Scripts/jquery-1.4.2.js"></script> <script language="javascript" type="text/javascript"> $(function () { $("#checkboxN").click(function () { if ($("#checkboxN").is(":checked")) { $("#saveSearchIdd").css("display", "block"); } else { $("#saveSearchIdd").css("display", "none"); } }); }); </script>