Solve the problem that ExtJS is not displayed in ie normally in chrome or Firefox. _ extjs-js tutorial

Source: Internet
Author: User
Because chrome is mostly used for debugging during the development process, debugging is rarely performed in ie (both of them should be taken into account now), and the page in ie cannot be loaded normally at the time, I want to cry when I see the error reported by ie, and I don't even have the wrong stack information (this is really bad for ie). I have been using ExtJS for nearly a year, also encountered a lot of strange problems, the most impressive is the problem that ExtJS shows in ie. Because chrome is mostly used for debugging during the development process, debugging is rarely performed in ie (both of them should be taken into account now), and the page in ie cannot be loaded normally at the time, I want to cry when I see the error reported by ie, but I don't even have the stack information (this is really bad for ie. I tried N multiple methods and found that the cause of this problem (more than 90% of the possibility) is that an English comma ',' is added to the js array ',', this is no problem in chrome and Firefox, as shown in the following code:

The Code is as follows:


Var win = Ext. create ('ext. window. Window ',{
// Some code is omitted here
//........
Items :[
{
Title: 'hello ',
Width: 100,
Height: 100
},{
Title: 'World ',
Width: 100,
Height: 100
},{
Title: 'foo ',
Width: 100,
Height: 100
}, // Note the English comma here. No error will be reported in chrome and Firefox.
]
// Some code is omitted here
//........
})


This is a difference in browser processing for arrays. When writing code, you should pay attention to this issue. If you have any similar problems, you can try to find them and you may be able to solve them. This is the problem I have met three times. (End) ^_^

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.