创建HTML元素的js代码, 例如ajaxfileupload.js, 行10 字符17代码:
1 |
var io = document.createElement( "<iframe id='" + frameId + "' name='" + frameId + "' />" );
|
以上代码在IE10下报如下错误:
SCRIPT5022: InvalidCharacterError
解决办法,改成如下兼容写法:
1 |
var io=document.createElement( "iframe" );
|
2 |
io.id=frameId; |
3 |
io.name=frameId; |
以上代码出至 ajaxfileupload.js, 行10 字符17 使用ajaxfileupload.js需把此行更改成上面那样,才能在IE10正常运行。