Differences between keywords in each browser as object properties
Recently, a backend colleague returned the following JSON structure:
View Sourceprint?1 {default:{name: ' Jack '}}
In the IE6/7/8 error, debugging for a long time to find out why.
The careful friend obtains has already discovered, the default is not the JS key word? Can I use it as a property? Some may say absolutely not.
Under test:
View sourceprint?1 var obj = {default:555};
2 alert (Obj.default);
You can see that you are prompted for syntax errors in Ie6/7/8/safari/opera and cannot function correctly. But Ie9/firefox/chrome popped up "555", normal.
If you change to [] way to obtain, the browser performance ibid.
Although in Ie9/firefox/chrome keyword can be used as Object attribute, but resolutely eliminate this kind of writing ...
Category: Brower special, Web effects