初学ExtJs求救于高手

Thomas.Sir 2011-09-22 01:56:44
var tabPanel = new Ext.TabPanel(
{
region : 'center',
enableTabScroll : true,
deferredRender : false,
activeTab : 0,
items :[
title: "导航",
autoLoad: "index.html"
//html: ""
]
});

index.html
<html>
<head>
<title>index.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
P{size:5px; color:red;}
</style>
<script type="text/javascript">
function verify()
{
alert("hello");
}
</script>
</head>

<body>
<input type="button" value="单击" onclick="verify()"/>
<p>你好吗?</p>
</body>
</html>

问题:
当页面加载的时候,index.html <body>里面的内容显示出来了,但是以外就不能识别,这里出现verify()方法没有定义,<p>标签也没有发生字体和颜色的变化,但按钮和<p>里面的内容能正常显示出来。
求救各路兄弟姐妹,怎样才能把一个页面完全加载进来,谢谢了。
...全文
92 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
jsut_yi 2011-09-22
  • 打赏
  • 举报
回复
autoload 有个参数叫 scripts: 设置为false则不会执行被引用页面的js的。 设置为true则反之。
安心逍遥 2011-09-22
  • 打赏
  • 举报
回复
new Ext.Viewport({
layout: 'fit',
items: [tabPanel],
renderTo: Ext.getBody()
});
tabPanel.show();

要new一个Ext.Viewport,或者放到window下

然后show一下的
romanitc 2011-09-22
  • 打赏
  • 举报
回复
我也想学extjs。。友情帮顶!
benbenkui 2011-09-22
  • 打赏
  • 举报
回复
好像有个autoscript的参数,autoload是不执行js的。
softroad 2011-09-22
  • 打赏
  • 举报
回复
iframe是比较简单的做法了,我刚试了几次,NND就是不行

Ext.get("foo").load({
url: "bar.php",
scripts: true,
params: "param1=foo¶m2=bar",
text: "Loading Foo..."
});
softroad 2011-09-22
  • 打赏
  • 举报
回复
var tabs = new Ext.TabPanel({
id: "tabs",
border: false,
activeTab: 0,
hideBorders: true,
resizeTabs: true,
deferredRender: false,
tabWidth: 120,
height: Ext.getBody().getHeight(),
width: Ext.getBody().getWidth(),
items: [{id: "indexTab", title: "首页", html: '<iframe id="forum_iframe" src="collect.jsp" style="width: 100%; height: 100%; overflow: hidden;" scrolling="no"></iframe>'}],
region: "center"
});
五哥 2011-09-22
  • 打赏
  • 举报
回复
html:'<iframe id="myFrame" name="myFrame" src="index.html" width="100%" height="100%" frameborder="0" scrolling="auto"></iframe>'

用一个iframe

67,541

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧