SVG在IE9的IE7/IE8兼容模式下不能被正常检测的问题

今天踩到的第二个地雷了。
在IE9的IE7/IE8兼容模式下调用createElementNS(“http://www.w3.org/2000/svg”, “svg”)是会报错的。
调用前需要检测一下:

参考资料:
https://github.com/highslide-software/highcharts.com/issues/189
-EOF-

String.prototype.split()兼容问题

IE的String.prototype.split()函数bug

脚本:

Firefox输出:

IE7/8(含IE9兼容的模式)输出:

详细说明:
http://www.sitepoint.com/the-power-of-stringprototypesplit-almost/
http://blog.stevenlevithan.com/archives/cross-browser-split
http://blog.stchur.com/2007/03/28/split-broken-in-ie/

-EOF-