up,高手来指点.
如何点了checkbox,才显示其他的控件(text,radio)??
如何点了checkbox,才显示其他的控件(text,radio)??
解决方案 »
- 答疑解惑:为什么很多的,应该是全部的cms系统,都不加载jquery
- window.open不会会阻止代码??有吗
- B/S开发初学者问题,望不吝赐教!!!
- 高人帮忙,关于document对象的,
- 谁知到哪里能下载javascript和AJAX方面的API,不要Jscript
- jquery的ui部分dialog在我写的html页面下正常运行,在VS2012MVC4框架下却不能运行,为什么?
- 如何用js实现某一个变量在浏览时一直保持,在关闭浏览器后就消失?谢了
- 如何有效的检测客户端IE是否能够使用Cookies?
- 在javascript中,可以设置下拉列表的readonly属性吗
- 如何隐藏CheckBox?
- 怎样知道CSS里面定义了哪些属性,prototype里面有这个功能吗,纯js的也可以
- 如何通过javascript将listbox中的项全部选中??
obj.style.display='block';
else
obj.style.display='none';
else
obj.style.display='none';修改了还是有错误.
<head>
<title>无标题文档</title>
<script language="javascript">function showadv(object){
var obj =document.getElementById("selective");
if (object.checked){
obj.style.display="block";
}else{
obj.style.display="none";
}
}</script>
</head><body>
<form name="form1" method="post" action="">
<input id="checkbox" type="checkbox" name="checkbox" onClick="showadv(this)" >
可选信息
<div id="selective" style="display:none">
<table>
<tr>
<td>1234</td><td>5678</td>
</tr>
<tr>
<td>1234</td><td>5678</td>
</tr>
<tr>
<td>1234</td><td>5678</td>
</tr>
</table>
</div>
<table>
</form>
</body>
</html>
obj.style.display=none;
这2句应该加上引号
obj.style.display="block";