<th data-options="field:'CanBaseFund',title:'是否提交資金',formatter: moreCheckBox,editor:{type:'checkbox',options:{on:'true',off:'false'}}" width="100" align="center">是否提交資金</th>
var row = $('#dg').datagrid('getSelected');
var rowIndex = $('#dg').datagrid('getRowIndex', row);
var ed = $('#dg').datagrid('getEditor', { index: rowIndex, field: 'CanBaseFund' });//獲取編輯器
var unitprice = $(ed.target).val();//獲取編輯器的值
編輯狀態下不管勾選還是沒勾選一直獲取的都是true
uj5u.com熱心網友回復:
類似以下方法:$(ed.target).checkbox('getValue');
不過easyui并沒有checkbox這種控制元件,如果是原生的checkbox可以用$(ed.target).prop('checked')來判斷是否選中
uj5u.com熱心網友回復:
謝謝大佬,我用這個判斷確實可行,這個困擾了兩天了終于解決了。感謝轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/224673.html
標籤:JavaScript
上一篇:vscode安裝插件提示We cannot connect to the Exiensions Marketplace at this time
