日期:2014-05-16  浏览次数:20654 次

easyui 使用汇总

NND,以后都不想用,还能在贱一点吗?

?

个人使用记录:

combo:

1.取选中的值:$("#area1").combobox("getValue")

2.默认选中第一个值、选择联动:

$("#area1").combobox({
??editable:false,
??valueField: 'id',
??textField: 'text',
??url: 'listDic.do?pid=1001',
??onSelect: function(record){
???ds.load({
????params:{ area: record.id}
???});
??},
??onLoadSuccess: function(){
???var val = $(this).combobox("getData");
???????? for (var item in val[0]) {
???????????? if (item == "id") {
???????????????? $(this).combobox("select", val[0][item]);
???????????? }
???????? }
??????? }
?});

?

?datagrid:

?1.单元格鼠标悬停tooltip:

?{field:'title',title:'主题',width:300,formatter: function(value, row, index) {?
??????????????????? return '<div title="' + row.fkcontext + '" class="mytips">' + value + '</div>';?
??????????????? }
???????? },

?

?onLoadSuccess:function(data){?
???$(".mytips").tooltip({?
????onShow: function(){?
?????$(this).tooltip('tip').css({??
??????width:'200',?
??????????????????????? boxShadow: '1px 1px 3px #292929'?????????????????????????
?????});
????}
??????????? });
??????? }

?

?

?

?

?

?