免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2078 | 回复: 2
打印 上一主题 下一主题

js用下拉菜单控制表格显示方式 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-25 22:43 |只看该作者 |倒序浏览
js代码:

<script type="text/javascript">
function hide(tb,sl)...{
if(document.getElementById(sl).value == "是")
document.getElementById(tb).style.display = "block";
else
document.getElementById(tb).style.display = "none";
}
</script>
下拉菜单:

<select name="s_outqua" >
            <option value="是">是</option>
            <option value="否" selected>否</option>
          </select>
表格:

<table width="100%" height="60"  border="0" cellpadding="0" cellspacing="0" id="tb1" style="display:none;">
            <tr>
              <td width="5%" align="center"> </td>
              <td width="23%" height="30" align="center">校外住宿地址:</td>
              <td width="56%" height="30"><input type="text" name="quaadd"></td>
              <td width="16%"> </td>
            </tr>
            <tr>
              <td align="center"> </td>
              <td height="30" align="center">是否经过审批:</td>
              <td height="30"><select name="s_app">
                  <option value="是">是</option>
                  <option value="否" selected>否</option>
              </select></td>
              <td> </td>
            </tr>
          </table>
就去干的代码可以实现多个下拉菜单控制多个不同的表格,网上其他的好像不行
此教程来源于97xxoo教程网(www.97xxoo.org
查看完整的教程请点:http://www.97xxoo.org/article/1/2008/20081124434.shtml
嘿嘿
自吹一下

论坛徽章:
52
码神
日期:2017-03-28 10:27:10综合交流区版块每日发帖之星
日期:2015-10-11 06:20:00综合交流区版块每日发帖之星
日期:2015-09-28 06:20:00综合交流区版块每日发帖之星
日期:2015-09-22 06:20:00每日论坛发贴之星
日期:2015-09-12 06:20:00综合交流区版块每日发帖之星
日期:2015-09-12 06:20:00综合交流区版块每日发帖之星
日期:2015-09-08 06:20:00综合交流区版块每日发帖之星
日期:2015-09-05 06:20:00综合交流区版块每日发帖之星
日期:2015-09-04 06:20:002015亚冠之德黑兰石油
日期:2015-09-01 10:41:53每日论坛发贴之星
日期:2015-10-11 06:20:00综合交流区版块每日发帖之星
日期:2015-10-12 06:20:00
2 [报告]
发表于 2008-11-25 23:28 |只看该作者
是够吹一下的。

论坛徽章:
0
3 [报告]
发表于 2008-11-26 09:38 |只看该作者
贴代码要么贴个能用的,要么别贴。。。。。。
为啥要贴个阉割过的?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP