<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
	  <th scope="col" width="60"><input type="checkbox" class="checkbox"  />全部</th>
	  <th scope="col">主题</th>
	  <th scope="col">消息类型</th>
	  <th scope="col">发送时间</th>
	</tr>
	
	{@each data as item}
	<tr>
      <td><input type="checkbox" class="checkbox" /></td>
      <!--0:已读,1:未读  -->
      {@if item.is_new==1}
      <td class="toolmsg"><a href="javascript:void(0);"  
      content="${item.content}" message_type="${item.message_type}">${item.title}</a></td>
      {@else}
       <td class="toolmsg"><a class="active" href="javascript:void(0);"  
      content="${item.content}" message_type="${item.message_type}">${item.title}</a></td>
      {@/if}
      
     <!--  0-系统消息  1-商城消息  -->
      {@if item.message_type==1}
      <td>商城消息</td>
      {@else}
       <td>系统消息</td>
      {@/if} 
      <td>${item.create_time}</td>
    </tr>
    {@/each}
</table>

 

/**
     * 获取选中对应的值
     */
    function getCheckedValue(){
        var msg_id = "";
        $(".table_main").find("table").find("tr:gt(0)").find("input").each(function(index, item){
            if($(this).prop("checked")){
                msg_id += $(this).attr("value") + ",";
            }
        });
        return msg_id;
    }

 

//全选/反选
                var subInputObj = $(".table_main").find("table").find("tr:gt(0)").find("input");
                $("#all").bindEvent(function(){
                    if($(this).prop("checked")){
                        $(subInputObj).prop("checked", true);
                    }else{
                        $(subInputObj).prop("checked", false);
                    }
                });

相关文章:

  • 2022-01-04
  • 2021-12-30
  • 2021-10-05
  • 2021-07-23
  • 2021-12-04
  • 2022-12-23
猜你喜欢
  • 2022-02-19
  • 2021-10-02
  • 2022-12-23
  • 2021-07-31
  • 2021-10-07
  • 2022-12-23
相关资源
相似解决方案