js实现table的显示和隐藏??????????? document.getElementById(id).style.display='none'; ok 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //隐藏表 //document.getElementById(id).style.display='none'; //显示表 document.getElementById(id).style.display=''; 试试这个:document.getElementById(id).style.display='block'; document.getElementById(id).style.display='none'; 这个是ok的,下一条不好用。 隐藏document.getElementById(id).style.display='none'; 显示document.getElementById(id).style.display='block'; document.getElementById(id).style.display='block'; 这个也不好用,还有别的方法吗??? document.getElementById(id).style.display='block'; document.getElementById("id").style.display="none";//block --彻底的删去了此标签,此布局会被抢占document.getElementById("id")visibility:hidden|visible; --隐藏了此标签 还占用布局 //显示document.getElementById(id).style.display='block';document.getElementById(id).style.display=''; document.getElementById(id).style.display=“”;这三条通通不好用呀!还有没有别的方法呢??? 表<table width="894" border=1 id=ckmx style="visibility:hidden">想让单击某一按钮是显示 function mxb(id) { //显示表 //document.getElementById(id).style.display=""; //document.getElementById(id).style.display='block'; } </script> <input name="radio" id=mxb_radio type="radio" value="radiobutton" checked onclick="mxb('ckmx')"> <table width="894" border=1 id=ckmx style="visibility:hidden"></table> <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script language="javascript">function mxb(id) {//显示表if(document.getElementById(id).style.display=="none") document.getElementById(id).style.display="block";else document.getElementById(id).style.display="none"; }</script></head><body><input name="radio" id=mxb_radio type="radio" value="radiobutton" checked onclick="mxb('ckmx')"><table width="894" border=1 bordercolor="red" id=ckmx style="display:none"> <tr><td></td></tr></table></body></html> function mxb(id) { //显示表 //document.getElementById(id).style.display='none'; //document.getElementById(id).style.display='block'; } </script> <input name="radio" id=mxb_radio type="radio" value="radiobutton" checked onclick="mxb('ckmx')"> <table width="894" border=1 id=ckmx style="display:none"> </table> [Quote=引用 15 楼 chuanyue_ali 的回复:]function mxb(id) { //显示表 //document.getElementById(id).style.display='none'; //document.getElementById(id).style.display='block'; } </script> <input name="radio" id=mxb_radio type="radio" value="radiobutton" checked onclick="mxb('ckmx')"> <table width="894" border=1 id=ckmx style="display:none"> </table>//你在代码里设置display,在页面设置visibility两个不是一个属性好好看看8楼写的吧 javascript让键盘自己按下你会吗 Ext show方法为什么不管用 js时间动态更新问题~急 一句简单的JS写法求助 JSP乱码问题 js table 排序 这段代码怎么写 都写不好啊 高手该如何解决第二次提交之后不重新加载页面的问题 document.write中又要引用一个js脚本,引用的脚本会在最后才被解释执行 急问--怎么传参数? 模仿百度Hi弹出层,出现个问题 急!!!请问:如何去掉JS变量中的斜杠?谢谢!
//document.getElementById(id).style.display='none';
//显示表
document.getElementById(id).style.display=''; 试试这个:
document.getElementById(id).style.display='block';
document.getElementById(id).style.display='none';
显示
document.getElementById(id).style.display='block';
document.getElementById("id")visibility:hidden|visible; --隐藏了此标签 还占用布局
document.getElementById(id).style.display='block';
document.getElementById(id).style.display='';
document.getElementById(id).style.display=“”;
这三条通通不好用呀!
还有没有别的方法呢???
想让单击某一按钮是显示
{
//显示表
//document.getElementById(id).style.display="";
//document.getElementById(id).style.display='block'; }
</script>
<input name="radio" id=mxb_radio type="radio" value="radiobutton" checked onclick="mxb('ckmx')">
<table width="894" border=1 id=ckmx style="visibility:hidden"></table>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function mxb(id)
{
//显示表
if(document.getElementById(id).style.display=="none")
document.getElementById(id).style.display="block";
else
document.getElementById(id).style.display="none"; }
</script></head>
<body>
<input name="radio" id=mxb_radio type="radio" value="radiobutton" checked onclick="mxb('ckmx')">
<table width="894" border=1 bordercolor="red" id=ckmx style="display:none">
<tr>
<td>
</td>
</tr>
</table></body>
</html>
{
//显示表
//document.getElementById(id).style.display='none';
//document.getElementById(id).style.display='block'; }
</script>
<input name="radio" id=mxb_radio type="radio" value="radiobutton" checked onclick="mxb('ckmx')">
<table width="894" border=1 id=ckmx style="display:none"> </table>
function mxb(id)
{
//显示表
//document.getElementById(id).style.display='none';
//document.getElementById(id).style.display='block'; }
</script>
<input name="radio" id=mxb_radio type="radio" value="radiobutton" checked onclick="mxb('ckmx')">
<table width="894" border=1 id=ckmx style="display:none"> </table>
//你在代码里设置display,在页面设置visibility两个不是一个属性
好好看看8楼写的吧