createPanel: function () {
var me = this;
var mainPanel = Ext.create('Ext.Panel', {
fullscreen: true,
cls: 'main-bg',
items: [{
renderTo: 'my-demo',
xtype: 'panel',
width: 850,
height: 500,
html: me.rowRender(data, 3, 2, 40, 30)
}]
});
},
test:function()
{
alert(1);
},
rowRender: function (data, rows, columns, width, height) {
var me = this;
var tempCount = 0;
for (var i = 0; i < data.length; i++) {
tempCount++;
str += '<input onclick="里面如何调用test方法" type="text" style="background-color:' + data[i].color + ';border-bottom:' + data[i].bottomLine + ' solid black;border-top:' + data[i].topLine + ' solid black;border-left:' + data[i].bottomLine + ' solid black;border-right:' + data[i].rightLine + ' solid black; width:' + width + 'px;height:' + height + 'px;" value=' + data[i].value + '></input>';
}
return str;
}
var me = this;
var mainPanel = Ext.create('Ext.Panel', {
fullscreen: true,
cls: 'main-bg',
items: [{
renderTo: 'my-demo',
xtype: 'panel',
width: 850,
height: 500,
html: me.rowRender(data, 3, 2, 40, 30)
}]
});
},
test:function()
{
alert(1);
},
rowRender: function (data, rows, columns, width, height) {
var me = this;
var tempCount = 0;
for (var i = 0; i < data.length; i++) {
tempCount++;
str += '<input onclick="里面如何调用test方法" type="text" style="background-color:' + data[i].color + ';border-bottom:' + data[i].bottomLine + ' solid black;border-top:' + data[i].topLine + ' solid black;border-left:' + data[i].bottomLine + ' solid black;border-right:' + data[i].rightLine + ' solid black; width:' + width + 'px;height:' + height + 'px;" value=' + data[i].value + '></input>';
}
return str;
}
解决方案 »
- VS2005昨天还好好的,今天一开就报错,高人谁知道怎么解决
- js判断邮箱格式
- CustomValidator没有执行
- Std_StranJF.js繁简体转换问题
- 无法读取xml文件,提示不能为嵌套子表
- 求:取得文件夹下面的所有文件,把文件名加载到DataGrid里面!
- 网页怎样存入数据库?网页的正文字段应该设成什么数据类型?急!急!急!
- ServerVersion = “SqlDataAdapter.SelectCommand.Connection.ServerVersion”引发了“Syste
- 很急
- 将数据写入已存在的Excel文件中
- 请教高手:多台机器同时访问同一台服务器,数据丢失问题。。
- vs2010下MVC3安装成功,但是VS2010开发环境中无法创建MVC3原因何在?
在页面级的function里找到包含了createPanel,test,rowRender等函数的那个对象实例,比如function ptest()
{
var o= 对象实例;
o.test(); //通过实例调用
}
绑定事件
listeners: {
render: function(c){
c.body.on('click', function(){...});
}
}