JQuery实现删除置灰

<script type="text/javascript">


$(function(){
var tabVal = document.getElementById('table_mb');
for( var i = 1; i < tabVal.rows.length ; i ++){
var val = tabVal.rows[i].cells[5].innerText.trim('');
alert(val);
if(val == "使用中"){
// alert('val='+val+'  '+ i);
$('#table_mb>tbody>tr:nth-child('+(i+1)+')>td:nth-child(7)>a:nth-child(3)')
.css("color","#CCCCCC").removeAttr('href').removeAttr('onclick');
} 
}
}); 


</script>

<table id="table_mb" width="1000" border="0" align="center" style="text-align: center">
  <tr align="center">
<td colspan="2"><h2>模版列表</h2></td>
</tr>
  <tr align="center"  height="35" bgcolor="pink">
    <td width="80">模板编号</td>
    <td width="100">模板名称</td>
    <td width="80">节点个数</td>
    <td width="220">创建时间</td>
    <td width="100">创建人</td>
    <td width="70">状态</td>
    <td width="350" colspan="2">操作</td>
    
  </tr>
  <s:iterator id="template" value="templates" status="st">
 <s:if test="%{#st.index % 2 == 0}">
<tr bgcolor="white" height="30">
 </s:if>
 <s:if test="%{#st.index % 2 != 0}">
<tr bgcolor="#EFEFEF" height="30">
 </s:if>


<td><s:property value="#template.templateid" /></td>
<td><s:property value="#template.name" /></td>
<td><s:property value="#template.totol" /></td>
<td><s:property value="#template.creattime" /></td>
<td><s:property value="#template.creator" /></td>

<!-- 改判断, -->
<s:if test="#template.state == 1 ">
<td>启用</td>  
</s:if>
<s:elseif test="#template.state == 2">
<td>使用中</td>
</s:elseif>
<s:elseif test="#template.state == 3" >
<td>弃用</td>
</s:elseif>

<td>
    <a href="<s:url value='ins_listByTempId.action'>
    <s:param  name='templateid' value='#template.templateid'/></s:url>">查看其实例</a>
    
    <a href="<s:url value='temp_findTempById.action'>
    <s:param name='templateid' value='#template.templateid'/></s:url>">修改</a>
    
<a class="delete_a" href="<s:url value="temp_delete.action"> 
<s:param name="template.templateid" value="#template.templateid"></s:param>
</s:url>" οnclick="return confirm('确实要删除吗?')">删除</a>
</td>
<td>
<a href="<s:url value="temp_createIns.action"> 
<s:param name="template.templateid" value="#template.templateid"></s:param></s:url>">生成流程实例</a>
</td>
</s:iterator>


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值