scrip 5022 : Exception thrown and not caught

edited 十月 2013 in Javascript
我在a.php呼叫javascript function並包含appendChild的DOM方法,append在b.html
在IE 9.0情況下就發生了 "例外",其他瀏覽器正常..
function js_appendChild(){
var newWin = window.open('b.html','main','width=630,height=600');
var div = document.createElement('div');
div.innerHTML='Text value';
if(document.all){
newWin.document.body.appendChild(div);
}else{
newWin.onload = function(){
newWin.document.body.appendChild(div);
}
}
}
js_appendChild();

原始討論: http://twpug.net/x/modules/newbb/viewtopic.php?topic_id=6417
Sign In or Register to comment.