错误:event为空或不是对象

仙剑 2011-07-07 10:50:22
IE浏览器报 错误:event为空或不是对象
而且打开页面时不会报错,一会儿错误就弹出了

IE版本 :IE 8

Extjs版本:4.0.2a

代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link type="text/css" rel="Stylesheet" href="../ext-4.0.2a/resources/css/ext-all.css" />
<script type="text/javascript" src="../ext-4.0.2a/builds/ext-core-debug.js"></script>
<script type="text/javascript" src="../ext-4.0.2a/ext-all-debug.js"></script>
<title>Framework Demo</title>
<script type="text/javascript">
Ext.onReady(function () {
Ext.create('Ext.container.Viewport', {
layout: 'border',
items: [{
xtype: 'container',
region: 'north',
height: 50,
padding: '5 10 5 10',
html: 'this is the head content'
}, {
title: 'Options',
region: 'west',
autoScroll: true,
padding: '0 0 5 5',
collapsible: true,
width: 200,
split: true
}, {
id: 'tabmain',
xtype: 'tabpanel',
region: 'center',
padding: '0 5 5 0'
}],
renderTo: Ext.getBody()
})
});
</script>
</head>
<body>
</body>
</html>


那位高手帮我看看错在哪里,不胜感激呀!
...全文
286 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
仙剑 2011-07-08
  • 打赏
  • 举报
回复
非常感谢 lsw645645645 fanchuanzhidu 两位帖友的帮助,问题解决了,果然是多引用了js。
豆虫 2011-07-07
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 jian200801 的回复:]
renderTo:Ext.getBody()
})

后面的分号加上,还是报同样的错误
[/Quote]
这里本来就不应该加分号
ext-core-debug.js这个文件不需要引
lsw645645645 2011-07-07
  • 打赏
  • 举报
回复
<script type="text/javascript" src="../ext-4.0.2a/builds/ext-core-debug.js"></script>
把这个删了试试
仙剑 2011-07-07
  • 打赏
  • 举报
回复
renderTo:Ext.getBody()
})

后面的分号加上,还是报同样的错误
xuexiaodong2009 2011-07-07
  • 打赏
  • 举报
回复
没用过Ext

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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