zoukankan      html  css  js  c++  java
  • table 动态隐藏tr行

    table:

    			<table style="100%" class="table01" cellspacing="1" cellpadding="5">
    				<tr><td class="td_title" width="15%" align="center" nowrap="nowrap" colspan="4">详	情</td>
    				</tr>
    				<tr id="qtdw"><td class="td_title" width="15%" align="center" nowrap="nowrap">牵头单位:</td>
    					<td align="left" style="word-wrap:break-word;word-break:break-all;" colspan="3">
    						<input id ="re_title" class="zxui-textbox" type="text" editable="false"
    							 style="600px"  value="${main_dept_name}">
    					</td>
    				</tr>
    				<tr><td class="td_title" width="15%" align="center" nowrap="nowrap">落实情况:</td>
    					<td align="left" style="word-wrap:break-word;word-break:break-all;" colspan="3">
    						<input id="contentes" class="zxui-textbox" type="text" editable="false"
    							style="600px;height:100px" multiline="true" value="${contentes}">
    					</td>
    				</tr>
    				<tr><td class="td_title" width="15%" align="center" nowrap="nowrap">存在问题:</td>
    					<td align="left" style="word-wrap:break-word;word-break:break-all;" colspan="3">
    						<input id="problem" class="zxui-textbox" type="text" editable="false"
    							style="600px;height:100px" multiline="true" value="${problem}">
    					</td>
    				</tr>
    				<tr><td class="td_title" width="15%" align="center" nowrap="nowrap">下周计划:</td>
    					<td align="left" style="word-wrap:break-word;word-break:break-all;" colspan="3">
    						<input id="next_plan" class="zxui-textbox" type="text" editable="false"
    							style="600px;height:100px" multiline="true" value="${nextplan}">
    					</td>
    				</tr>
    				<tr id="sbr"><td class="td_title" width="15%" align="center" nowrap="nowrap">上 报 人:</td>
    					<td align="left" style="word-wrap:break-word;word-break:break-all;" colspan="3">
    						<input id ="re_title" class="zxui-textbox" type="text" editable="false"
    							 style="600px"  value="${create_name}">
    					</td>
    				</tr>
    			</table>
    

    有两个角色共用一个页面,其中table显示略有不同,用传递身份参数来控制牵头单位、上报人的行的隐藏。

    js:

    $(function(){
    	var identity = '${identity}';
    	if (identity == 'jbdcy') {
    		$('#qtdw').hide(); 
    		$('#sbr').hide();
    	}	
    });

    更多方法参考感谢:http://www.jb51.net/article/54118.htm

      

  • 相关阅读:
    go标准库的学习-net/http
    go标准库的学习-sync互斥
    sqlplus命令大全
    Oracle 11g安装步骤详谈
    安装64位版Oracle11gR2后无法启动SQLDeveloper的解决方案(原创) (2016-10-29 下午01:56)
    Dos命令查看端口占用及关闭进程
    access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")
    Hibernate的集合映射与sort、order-by属性
    Hibernate总结2 API和配置文件
    MyEclipse8.5启动无法选择工作空间的问题
  • 原文地址:https://www.cnblogs.com/ckxlovejava/p/7372397.html
Copyright © 2011-2022 走看看