[問題] IE7的request問題

看板Ajax作者 (小強)時間15年前 (2009/12/28 00:47), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
我用一個function createRequest來初始ajax 接著再 request=createRequest(); 可是這個request在ie7卻無法重複執行 在ie8和firefox都運作正常 在ie7就得重新create 請問是什麼問題?? function createRequest() { var requestn = null; try { requestn = new XMLHttpRequest(); } catch (trymicrosoft) { try { requestn = new ActiveXObject("Msxml2.XMLHTTP"); } catch (othermicrosoft) { try { requestn = new ActiveXObject("Microsoft.XMLHTTP"); } catch (failed) { requestn = null; } } } if (requestn == null) { alert("Error creating request object!"); } else { return requestn; } } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 211.76.249.2

12/28 00:48, , 1F
我是用ietester來測試的..還是是ietester的問題?
12/28 00:48, 1F
文章代碼(AID): #1BDu-cR7 (Ajax)
文章代碼(AID): #1BDu-cR7 (Ajax)