IE的String.prototype.split()函数bug
脚本:
1 |
"a:b:c".split(/(:)/) |
Firefox输出:
1 |
["a",":","b",":","c"] |
IE7/8(含IE9兼容的模式)输出:
1 |
a,b,c |
详细说明:
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-