解决方案 »
- 大神们,这个效果实现了,分全给你,不够的话还可以再商量。
- subline高亮选中单词怎么配置底色?
- 怎么在ASP JavaScript中调用函数,并使用textbox里的值
- 怎么禁止checkbox选项框为只读,类似input type=text readonly的效果。readonly对checkbox不起作用。使用disabled会使该选项值也无效
- 很急的一个东西,希望大家帮忙看看。。。。
- 如何选中下拉框的某一value值(下拉框的选中问题)
- 【模板】script的type属性为x-tmpl,怎样分离出这部分代码单独写模板文件
- 高手们,帮帮忙!!!马上结贴
- 关于调用控件的问题!
- 请问:是什么设置导致“网页过期”的提示
- js 排列 组合 怎么实现
- extjs的问题 求各位大神救救小弟
看这里
这样写
{header:'支撑文件',dataIndex:'supportfile',width:60,renderer:renderSupportFile,handler:function(){
alert('123456');
}}
var str = "<input type='button' value='查看' onclick='javascript:showTest() ' />";
return str;
}
你这里的onclick就不要了
/**
* ClassName 人员数据列表视图
* */
Ext.define("nac.system.view.DataBackUpGrid", {
extend : "Ext.grid.Panel",
alias : "widget.DataBackUpGrid",
id:'DataBackUpGrid',
region:'center',
store : 'nac.system.store.DataBackUpStore',
border : 0,
height:"100%",
width:"100%",
multiSelect : true,
frame : true,
tbar:[
{xtype:'button',text:'立即备份',ref:'backup',tooltip:'立即备份',iconCls:'hupu_manual'},
{xtype:'button',text:'自动备份',ref:'auto_rec',tooltip:'自动备份',iconCls:'hupu_autobackup'},
{xtype:'button',text:'自动清理',ref:'auto_del',tooltip:'自动清理',iconCls:'hupu_autoclear'}
],
listeners:{
'beforerender':function(self,opts){
self.getStore().load();
}
},
sortableColumns:false,
enableKeyNav : true, //可以使用键盘控制上下
columnLines : false, //展示竖线
columns:[{
header:'备份文件',
flex:1,
dataIndex:'fileName'
},{
header:'备份日期',
flex:0.8,
dataIndex:'fileDate',
renderer: function(value,metaData,record,colIndex,store,view) {
value = Ext.util.Format.date(value,'Y-m-d H:i:s');
return (value==null||value=="")?"--":value;
}
},{
header:'文件大小',
flex:.8,
dataIndex:'fileSize'
},{
xtype:'actioncolumn',
header:'操作',
width:100,
id:'DataBackUpDeal',
items: [{
icon: 'nacCore/nacCoreApp/nacApp/images/mainmenu/db_restore.png',
tooltip: '还原',
iconCls: 'hupu_cursor'
},{
iconCls : 'hupu_space',
tooltip: ''
},{
icon: 'nacCore/nacCoreApp/nacApp/images/mainmenu/db_remove.png',
tooltip: '删除',
iconCls: 'hupu_cursor'
}]
}]
});
icon: 'nacCore/nacCoreApp/nacApp/images/mainmenu/db_remove.png',
tooltip: '删除',
iconCls: 'hupu_cursor',
handler:function{
alert('123456');
}
function showTest() {
alert(123);
}这个函数是不是在ready里面写着呢?放到最外面试试。而如果改用onclick='alert(“+projectid+”) '却能正常执行
肯定是作用域的问题
v = (Math.round((v-0)*100))/100;
v = (v == Math.floor(v)) ? v + ".00" : ((v*10 == Math.floor(v*10)) ? v + "0" : v);
return v + "%";
}
这样写对我有帮助啊。赞一个