标签:setting fit sele ola 临时 span tin ace uri
1 $(function(){ 2 fun={ 3 add:function(){ 4 $.ajaxSettings.async=false; 5 var rows=$(‘#dg‘).datagrid(‘getRows‘); 6 var len=rows.length+1; //获取当前页面所有的记录数 7 var row=[]; 8 row[‘num‘]=len; 9 $(‘#dg‘).datagrid(‘insertRow‘,{ //添加记录到当前datagrid中 10 row:{ 11 id:len, 12 num:len 13 } 14 }); 15 } 16 } 17 18 $(‘#dg‘).datagrid({ 19 url:"", 20 title:"数字列表", 21 singleSelect:true, 22 fitColumns:true, 23 columns:[[ 24 {field:"id",title:‘ID号‘,width:100,align:"center"}, 25 {field:"num",title:‘数字‘,width:100,align:"center"} 26 ]], 27 width:300 28 }) 29 })
标签:setting fit sele ola 临时 span tin ace uri
原文地址:https://www.cnblogs.com/haokan/p/12002976.html