问题描述
- 用jquery判断datagrid中checkbox是否被选中的有关问题
- $(function(){
$('#pro_manage_show_grid').datagrid({
title:'标准任务执行查询'
iconCls:'icon-ok'
nowrap: true
autoRowHeight: true
striped: true
collapsible:true
method: 'post'
url:path+'/monitor/f1/queryTasklogAll.do'
sortName: ''
sortOrder: 'asc'
idField:'id'
pageSize:20
pageList:[2050100]
loadMsg:'请稍候,努力加载中...'
singleSelect:true
fitColumns:true
fit:true
columns:[[
{field:'ID'title:'ID'width:100checkbox:trueresizable:false}
{field:'bizBeginDate'title:'业务开始日期'width:100sortable:trueresizable:true}
{field:'bizEndDate'title:'业务结束日期'width:100sortable:trueresizable:true}
{field:'taskCode'title:'任务编码'width:100resizable:true}
{field:'taskStatus'title:'任务状态'width:100resizable:true}
{field:'taskName'title:'任务中文名'width:100resizable:true}
{field:'beginDt'title:'执行开始时间'width:100resizable:true}
{field:'endDt'title:'执行结束时间'width:100resizable:true}
{field:'workFlowRunId'title:'工作流ID'width:100resizable:true}
]]
pagination:true
rownumbers:true
collapsible:false
remoteSort:false
tools:'#pro_manage_list_tools'
//loadFilter:pagerFilter
loader:dataLoader}); //给状态为-1的价位红色 $('#pro_manage_show_grid').datagrid({ rowStyler:function(indexrow){ if(row.taskStatus==-1){ return 'background-color:red;'; } } }); //$('#pro_manage_show_grid').datagrid('loadData' getData()); var p = $('#pro_manage_show_grid').datagrid('getPager'); if (p){ $(p).pagination({ onBeforeRefresh:function(){ alert('before refresh'); } }); }
});
//自适应$(window).resize(function(){ $(""#pro_manage_list"").layout('resize'); }); //此界面,设置成定时刷新界面。每两分钟刷新一次function myrefresh(){ window.location.reload(); } setTimeout('myrefresh()'1000*60*2); //每两分钟刷新一次function query(){ //Please wait... $.blockUI({css: { border: 'none' padding: '15px' backgroundColor: '#000' '-webkit-border-radius': '10px' '-moz-border-radius': '10px' opacity: .5 color: '#fff'}}); // $.ajax({ url:path+'/monitor/f1/queryTasklogList.do' type: 'POST' dataType: 'json' data: $(""#dataForm"").serialize() success: function(msg){ var posData = eval(msg); $('#pro_manage_show_grid').datagrid('loadData'posData); $.unblockUI(); } error: function(msg){ $.unblockUI(); alert(""操作失败!""); } });}function querylog(){ var row = $('#pro_manage_show_grid').datagrid('getSelected'); var _url = path+'/monitor/f2/queryLog.do?workFlowId='+ row.workFlowRunId; window.parent.initCenter(""日志信息""_urlbb""true);}
在按钮事件激发querylog()中如何判断checkbox是否选中
解决方案
if($(""#id"").attr(""checked"")==true)
时间: 2024-09-03 05:40:26