在 Extjs 的外部 html 中使用脚本
Using script in an external html in Extjs
我在 Extjs 的面板中有一个外部 html。但是在我的 html 中用脚本标签定义的脚本没有被加载;因此我的 html 无法正常工作。
var test = Ext.create('Ext.panel.Panel', {
title : 'Example 1',
width : 250,
height : 250,
frame : true,
scripts: true,
autoLoad : {
url : './test.html'
}
})
到目前为止我已经尝试过:
- Ext.Loader.Require
- Ext.Loader.LoadScript
- 内联(在 html 文件内)
- 在 extjs 所在的主要 html 中
前两个将我的脚本加载到 Extjs(我可以在 firebug 中看到它)但是我的 html 文件仍然无法访问它。
因此;
有哪些(可行的)替代方法可以让它发挥作用?
我在 Extjs 的面板中有一个外部 html。但是在我的 html 中用脚本标签定义的脚本没有被加载;因此我的 html 无法正常工作。
var test = Ext.create('Ext.panel.Panel', {
title : 'Example 1',
width : 250,
height : 250,
frame : true,
scripts: true,
autoLoad : {
url : './test.html'
}
})
到目前为止我已经尝试过:
- Ext.Loader.Require
- Ext.Loader.LoadScript
- 内联(在 html 文件内)
- 在 extjs 所在的主要 html 中
前两个将我的脚本加载到 Extjs(我可以在 firebug 中看到它)但是我的 html 文件仍然无法访问它。
因此;
有哪些(可行的)替代方法可以让它发挥作用?