HTML调用Extjs中方法
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;
}
...全文
相关推荐
extjs4学习文档
EXTJS4中的核心概念包括`Ext.onReady`和`Ext.application`方法。`Ext.onReady`在DOM加载完成后自动调用,确保所有元素都可被脚本引用。
extjs_dwr整合例子
**使用DWR调用Java方法**: 在ExtJS的组件或控制器中,通过DWR生成的JavaScript接口直接调用服务器端的方法。
extJS中常用的4种Ajax异步提交方式
**指定HTML表单的Ajax提交** 在`saveUser_ajaxSubmit2`函数中,我们看到使用了`form`属性来指定一个HTML表单ID,这样ExtJS会自动获取表单中的数据并发送。
extjs简单例子
这个教程可能解释了作用域的概念,以及如何在ExtJS中正确管理和使用作用域,确保变量和函数在正确的位置被访问和调用。5.
ExtJS 2.0实用简明教程 之ExtJS版的Hello
然后调用`show()`方法使窗口可见。运行这个`hello.html`文件,你会看到屏幕上出现一个带有标题“hello”的窗口,其中包含文本“Hello, easyjf open source”。



