工作JQUERY 1.5
function loadPostQry(str) {
$.get('fillpage.php','prodcode='+str, function(data) {
$('#s_content').html(data);
},
"html");
}
this piece of code is running on every browser but not on IE. I think there's something missing, the XHR or something else that has got to do with the engine.
//不要混淆這一個,上面的代碼是什麼,我「M試圖得到一些答案......
JQUERY 1.4
function getXMLHttpRequest()
{
if (window.XMLHttpRequest) {
return new window.XMLHttpRequest;
}
else {
try {
return new ActiveXObject("MSXML2.XMLHTTP.3.0");
}
catch(ex) {
return null;
}
}
}
我試圖完成像ver1.4代碼...
問:如何WOU我寫了一段代碼與ver1.5兼容,每次調用代碼時,它都會首先檢查引擎。
這是JQUERY網站的exerpt ...
--xhr ---默認:ActiveXObject的可用時(IE),了XMLHttpRequest 否則回調創建 XMLHttpRequest對象。默認爲 ActiveXObject(IE),否則爲 XMLHttpRequest。覆蓋到 提供自己實施 XMLHttpRequest的或增強的 工廠
各地需要幫助的工作..謝謝...
當它不運行時會發生什麼?任何錯誤? – 2011-02-10 00:02:05
你有兩個不同的片段,但我實際上看不出它們是如何相關的,爲什麼它們是1.5而另一個是1.4。 – GolezTrol 2011-02-10 00:08:13