Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ie兼容性问题记录 #50

Open
youngwind opened this issue Mar 26, 2016 · 0 comments
Open

ie兼容性问题记录 #50

youngwind opened this issue Mar 26, 2016 · 0 comments

Comments

@youngwind
Copy link
Owner

总会不时地碰到发现一个ie下的兼容性问题,但是又不成体系,就把它们当做集合写在这儿了。
#1.数组末尾多余逗号

var ary = [1,2,3,]

在IE8下会被解析成下面的语句

var ary = [1,2,3,null]

所以,请不要手贱多写逗号...定义对象的时候多写逗号倒是不会出错

var demo = {
   name:"lsf",
}
// 在IE8没问题,据说在IE6/7下会报错
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant