【发布时间】:2012-03-28 07:31:52
【问题描述】:
下面的脚本在 Firefox 和 Chrome 上运行良好,但我似乎无法让它与 ie 一起使用,尝试了所有方法,甚至降低了浏览器的安全性,看看是否会阻止它,但我仍然无法让它工作.
function postData() {
var http = new XMLHttpRequest();
var url = "/scripts/remove_fr.php";
var params = "";
http.open("GET", url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function() { //Call a function when the state changes.
if(http.readyState == 4 && http.status == 200) {
}
}
http.send(params);
}
$("#qwerty").click(function () {
$('#qwerty').remove();
});
</script>
【问题讨论】:
-
IE 版本?错误?什么不工作?发生了什么?
标签: javascript jquery xml ajax