<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function show(val){
if(val==1 && document.getElementById("ckShow").checked)
{
document.getElementById("ckHidden").checked=false;
document.getElementById("show1").style.display = "block";
}
else if(val==0 && document.getElementById("ckHidden").checked)
{document.getElementById("ckShow").checked=false;
document.getElementById("show1").style.display = "none";
}
}
</script>
</head><body>
<table width="75%" border="1">
<tr>
<td colspan="2" align="center">信息常识<a name="top"> </a></td>
</tr>
<tr>
<td width="29%">1.什么是医疗保险?
<INPUT type="checkbox" id="ckShow" checked onclick=show(1)>显示</td>
<INPUT type="checkbox" id="ckHidden" onclick=show(0)>隐藏</td>
</td>
<td width="71%" id="show1"><select name="select">
<option>11111111</option>
<option>2222222222</option>
<option>33333333</option>
</select></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function show(val){
if(val==1 && document.getElementById("ckShow").checked)
{
document.getElementById("ckHidden").checked=false;
document.getElementById("show1").style.display = "block";
}
else if(val==0 && document.getElementById("ckHidden").checked)
{document.getElementById("ckShow").checked=false;
document.getElementById("show1").style.display = "none";
}
}
</script>
</head><body>
<table width="75%" border="1">
<tr>
<td colspan="2" align="center">信息常识<a name="top"> </a></td>
</tr>
<tr>
<td width="29%">1.什么是医疗保险?
<INPUT type="checkbox" id="ckShow" checked onclick=show(1)>显示</td>
<INPUT type="checkbox" id="ckHidden" onclick=show(0)>隐藏</td>
</td>
<td width="71%" id="show1"><select name="select">
<option>11111111</option>
<option>2222222222</option>
<option>33333333</option>
</select></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</body>
</html>
解决方案 »
- 用JQuery删除Div在IE没问题,在Firefox有奇怪问题(需要在页面任何一处单击左键DIV才消失),请高手分析下原因,并给出解决方案,谢谢!
- 关于浏览器地址的获取,在线等,谢谢
- JS创建下拉框如何实现页面跳转
- 急!急!急!在web界面里怎么实现进度条,比如百分比。。????
- 如何访问form里的table的属性?
- 如何屏蔽IE的工具栏的刷新按钮?目前我已经屏蔽了所有关于刷新的快捷键
- 怎样让表格中的文字旋转一下方向?
- 在c中嵌入javascript的问题!
- 快救命呀!关于日期问题?
- 使用jquery append方法在jsp页面中加入html代码后,页面可显示写入的内容,但是页面所引用的js对新增内容无效
- 如何判断checkbox至少选择一项
- <div>元素隐藏、显示的时候触发那些事件
<input id="ss" type="checkbox" onclick="show(id1,'show1')">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function show(obj,str)
{
var td = document.getElementById(str);
td.style.display = (obj.checked) ? "block" : td.style.display = "none";
}
</script>
</head><body>
<table width="75%" border="1">
<tr>
<td colspan="2" align="center">信息常识<a name="top"> </a></td>
</tr>
<tr>
<td width="29%">1.什么是医疗保险? <input id="cb" name="cb" type="checkbox" onclick="show(this, 'show1')">显示</td>
<td width="71%" id="show1" style="display:none"><select name="select">
<option>11111111</option>
<option>2222222222</option>
<option>33333333</option>
</select></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</body>
</html>