投放本站广告请联系:
extjscn#126.com
ExtJS 4浏览器兼容
前言
按理说, Ext js 的开发应该没有浏览器兼容的问题,因为Ext js 本身就有考虑各浏览器兼容的状况。
本篇讨论的与其说是Ext js 开发的兼容性问题, 还不如说成是web 开发的兼容性问题。
internet explorer cannot open the internet site operation aborted
在IE 7 及以下版本报此错误,
(中文错误: ”Internet Explorer无法打开internet站点,已终止操作“)
而且页面无法打开。
但是在chrome 和 firefox 已经 IE 8(和以上版本) 都是正常的。
原因基本上可能有两个:
1. 页面标签不匹配, 比如
有开始标签, 却少了
的结束标签2. 在页面还没有 load完成之前就往页面元素中append 子元素。
ExtJS 中典型例子就是不在 Ext.onReady 里面创建组件。
Expected identifier,String or number
Ext.create('Ext.window.Window', { title: 'Test Window', height: 580, width: 600, layout: 'fit', html: 'This is Test Window!', }).show();
以上这段,只是在IE中不正常, 并且不正常。
删除 html 配置项最后的 逗号就可以了。
看起来是IE与语法的验证更严格一些。
onsole
开发的时候总是喜欢使用
console.log()
的方式在控制台打印一些信息,但是在IE的浏览器中并没有这个对象。
所以使用console 之前需要做非空的判断
if(typeof(console)!="undefined"&&console!=null)
作者: oscar999
原文: http://blog.csdn.net/oscar999/article/details/10485831
- 要发表评论,请先登录