相关疑难解决方法(0)

超时XMLHttpRequest

如何在以下脚本中添加超时?我希望它将文本显示为"超时".

var bustcachevar = 1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects = ""
var rootdomain = "http://" + window.location.hostname
var bustcacheparameter = ""

function ajaxpage(url, containerid) {
    var page_request = false
    if (window.XMLHttpRequest) // if Mozilla, Safari etc
        page_request = new XMLHttpRequest()
    else if (window.ActiveXObject) { // if IE
        try {
            page_request = new ActiveXObject("Msxml2.XMLHTTP")
        } catch (e) {
            try {
                page_request = new ActiveXObject("Microsoft.XMLHTTP")
            } catch (e) {}
        }
    } …
Run Code Online (Sandbox Code Playgroud)

timeout xmlhttprequest

33
推荐指数
1
解决办法
8万
查看次数

标签 统计

timeout ×1

xmlhttprequest ×1