亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? aa.js

?? AjaxAction基本實現
?? JS
?? 第 1 頁 / 共 2 頁
字號:
/*
Copyright 2005  Vitaliy Shevchuk (shevit@users.sourceforge.net)

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

*/

AjaxAnywhere.defaultInstanceName = "default";

// constructor;
function AjaxAnywhere() {

    this.id = AjaxAnywhere.defaultInstanceName;
    this.formName = null;
    this.notSupported = false;
    this.delayBeforeContentUpdate = true;
    this.delayInMillis = 100;

    if (window.XMLHttpRequest) {
        this.req = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        try {
            this.req = new ActiveXObject("Msxml2.XMLHTTP");
        } catch(e) {
            try {
                this.req = new ActiveXObject("Microsoft.XMLHTTP");
            } catch(e1) {
                this.notSupported = true;
                /* XMLHTTPRequest not supported */
            }
        }
    }

    if (this.req == null || typeof this.req == "undefined")
        this.notSupported = true;
}

/**
* Stores substitutes SubmitButton names in to redo sustitution if a button was eventually inside a refresh zone.
*/
AjaxAnywhere.prototype.substitutedSubmitButtons = new Array();
AjaxAnywhere.prototype.substitutedSubmitButtonsInfo = new Object();

/**
* Returns a Form object that corresponds to formName property of this AjaxAnywhere class instance.
*/
AjaxAnywhere.prototype.findForm = function () {
    var form;
    if (this.formName != null)
        form = document.forms[this.formName];
    else if (document.forms.length > 0)
        form = document.forms[0];

    if (typeof form != "object")
        alert("AjaxAnywhere error: Form with name [" + this.formName + "] not found");
    return form;
}


/**
* Binds this instance to window object using "AjaxAnywhere."+this.id as a key.
*/
AjaxAnywhere.prototype.bindById = function () {
    var key = "AjaxAnywhere." + this.id;
    window[key] = this;
}

/**
* Finds an instance by id.
*/
AjaxAnywhere.findInstance = function(id) {
    var key = "AjaxAnywhere." + id;
    return window[key];
}

/**
* This function is used to submit all form fields by AJAX request to the server.
* If the form is submited with <input type=submit|image>, submitButton should be a reference to the DHTML object. Otherwise - undefined.
*/
AjaxAnywhere.prototype.submitAJAX = function(additionalPostData, submitButton) {

    if (this.notSupported)
        return this.onSubmitAjaxNotSupported(additionalPostData, submitButton);

    if (additionalPostData == null || typeof additionalPostData == "undefined")
        additionalPostData = "";

    this.bindById();

    var form = this.findForm();

    var actionAttrNode = form.attributes["action"];
    var url = actionAttrNode == null?null:actionAttrNode.nodeValue;
    if ((url == null) || (url == ""))
        url = location.href;

    var pos = url.indexOf("#");
        if (pos!=-1)
            url = url.substring(0,pos);
        if ((url == null) || (url == ""))
            url = location.href;
        pos = url.indexOf("#");
        if (pos!=-1)
            url = url.substring(0,pos);

    var zones = this.getZonesToReload(url, submitButton);

    if (zones == null) {
        // submit in tradiditional way :
        this.submitOld(form,submitButton)
        return;
    }

    this.dropPreviousRequest();

    this.req.open("POST", url, true);
    this.req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    this.req.setRequestHeader("Accept", "text/xml");

    var postData = this.preparePostData(submitButton);

    if (zones != "")
        postData = '&aazones=' + encodeURIComponent(zones) + "&" + postData + "&" + additionalPostData;
    else
        postData += "&" + additionalPostData;

    this.sendPreparedRequest(postData);

}
/**
* sends a GET request to the server.
*/
AjaxAnywhere.prototype.getAJAX = function(url, zonesToRefresh) {
    if (this.notSupported)
        return this.onGetAjaxNotSupported(url);

    this.bindById();

    if (zonesToRefresh == null || typeof zonesToRefresh == "undefined")
        zonesToRefresh = "";
    var urlDependentZones = this.getZonesToReload(url);
    if (urlDependentZones == null) {
        location.href = url;
        return;
    }

    if (urlDependentZones.length != 0)
        zonesToRefresh += "," + urlDependentZones;

    this.dropPreviousRequest();

    url += (url.indexOf("?") != -1) ? "&" : "?";

    url += "aaxmlrequest=true&aa_rand=" + Math.random();
    // avoid caching

    if (zonesToRefresh != null && zonesToRefresh != "")
        url += '&aazones=' + encodeURIComponent(zonesToRefresh);

    this.req.open("GET", url, true);
    this.req.setRequestHeader("Accept", "text/xml");

    this.sendPreparedRequest("");
}

/**
* @private
*/
AjaxAnywhere.prototype.sendPreparedRequest = function (postData) {
    var callbackKey = this.id + "_callbackFunction";
    if (typeof window[callbackKey] == "undefined")
        window[callbackKey] = new Function("AjaxAnywhere.findInstance(\"" + this.id + "\").callback(); ");
    this.req.onreadystatechange = window[callbackKey];

    this.showLoadingMessage();

    this.req.send(postData);
}
/**
* Used internally by AjaxAnywhere. Aborts previous request if not completed.
*/
AjaxAnywhere.prototype.dropPreviousRequest = function() {
    if (this.req.readyState != 0 && this.req.readyState != 4) {
        // abort previous request if not completed
        this.req.abort();
        this.handlePrevousRequestAborted();
    }
}

/**
* Internally used to prepare Post data.
* If the form is submited with <input type=submit|image>, submitButton is a reference to the DHTML object. Otherwise - undefined.
*/
AjaxAnywhere.prototype.preparePostData = function(submitButton) {
    var form = this.findForm();
    var result = "&aaxmlrequest=true";
    for (var i = 0; i < form.elements.length; i++) {
        var el = form.elements[i];
        if (el.tagName.toLowerCase() == "select") {
            for (var j = 0; j < el.options.length; j++) {
                var op = el.options[j];
                if (op.selected)
                    result += "&" + encodeURIComponent(el.name) + "=" + encodeURIComponent(op.value);
            }
        } else if (el.tagName.toLowerCase() == "textarea") {
            result += "&" + encodeURIComponent(el.name) + "=" + encodeURIComponent(el.value);
        } else if (el.tagName.toLowerCase() == "input") {
            if (el.type.toLowerCase() == "checkbox" || el.type.toLowerCase() == "radio") {
                if (el.checked)
                    result += "&" + encodeURIComponent(el.name) + "=" + encodeURIComponent(el.value);
            } else if (el.type.toLowerCase() == "submit") {
                if (el == submitButton) // is "el" the submit button that fired the form submit?
                    result += "&" + encodeURIComponent(el.name) + "=" + encodeURIComponent(el.value);
            } else if (el.type.toLowerCase() != "button") {
                result += "&" + encodeURIComponent(el.name) + "=" + encodeURIComponent(el.value);
            }
        }
    }
    if (typeof submitButton != 'undefined' && submitButton != null && submitButton.type.toLowerCase() == "image") {
        if (submitButton.name == null || submitButton.name == "" || typeof submitButton.name == "undefined")
            result += "&x=1&y=1"; // .x and .y coordinates calculation is not supported.
        else
            result += "&" + encodeURIComponent(submitButton.name) + ".x=1&" +
                      encodeURIComponent(submitButton.name) + ".y=1";
    }
    return result;
}

/**
* Pauses the thread of execution for the specified number of milliseconds
* @private
*/
function delay(millis) {
    date = new Date();
    var curDate = null;
    do {
        curDate = new Date();
    }
    while (curDate - date < millis);
}

/**
* A callback. internally used
*/
AjaxAnywhere.prototype.callback = function() {

    if (this.req.readyState == 4) {

        this.onBeforeResponseProcessing();
        this.hideLoadingMessage();

        if (this.req.status == 200) {

            if (this.req.getResponseHeader('content-type').toLowerCase().substring(0, 8) != 'text/xml')
                alert("AjaxAnywhere error : content-type in not text/xml : [" + this.req.getResponseHeader('content-type') + "]");

            var docs = this.req.responseXML.getElementsByTagName("document");
            var redirects = this.req.responseXML.getElementsByTagName("redirect");
            var zones = this.req.responseXML.getElementsByTagName("zone");
            var exceptions = this.req.responseXML.getElementsByTagName("exception");
            var scripts = this.req.responseXML.getElementsByTagName("script");
            var images = this.req.responseXML.getElementsByTagName("image");

            if (redirects.length != 0) {
                var newURL = redirects[0].firstChild.data;
                location.href = newURL;
            }
            if (docs.length != 0) {
                var newContent = docs[0].firstChild.data;

                //cleanup ressources
                delete this.req;

                document.close();
                document.write(newContent);
                document.close();
            }

            if (images.length != 0) {
                var preLoad = new Array(images.length);
                for (var i = 0; i < images.length; i++) {
                    var img = images[i].firstChild;
                    if (img != null) {
                        preLoad[i] = new Image();
                        preLoad[i].src = img.data;
                    }
                }
                if (this.delayBeforeContentUpdate) {
                    delay(this.delayInMillis);
                }
            }

            if (zones.length != 0) {
                for (var i = 0; i < zones.length; i++) {
                    var zoneNode = zones[i];

                    var name = zoneNode.getAttribute("name");
                    var id = zoneNode.getAttribute("id");

                    var html = "";

                    for (var childIndex = 0; childIndex < zoneNode.childNodes.length; childIndex++) {
                        html += zoneNode.childNodes[childIndex].data
                    }

                    var zoneHolder = name!=null?
                                     document.getElementById("aazone." + name):
                                     document.getElementById(id);

                    if (zoneHolder != null && typeof(zoneHolder) != "undefined") {
                        zoneHolder.innerHTML = html;
                    }

                }
            }
            if (exceptions.length != 0) {
                var e = exceptions[0];
                var type = e.getAttribute("type");
                var stackTrace = e.firstChild.data;
                this.handleException(type, stackTrace);
            }

            if (scripts.length != 0) {
                for (var $$$$i = 0; $$$$i < scripts.length; $$$$i++) {
                    // use $$$$i variable to avoid collision with "i" inside user script
                    var script = scripts[$$$$i].firstChild;
                    if (script != null) {
                        script = script.data;
                        if (script.indexOf("document.write") != -1) {
                            this.handleException("document.write", "This script contains document.write(), which is not compatible with AjaxAnywhere : \n\n" + script);
                        } else {

                            eval("var aaInstanceId = \""+this.id+"\"; \n"+script);
                        }
                    }
                }

                var globals = this.getGlobalScriptsDeclarationsList(script);
                if (globals != null)
                    for (var i in globals) {
                        var objName = globals[i];
                        try {
                            window[objName] = eval(objName);
                        } catch(e) {
                        }
                    }
            }

        } else {
            if (this.req.status != 0)
                this.handleHttpErrorCode(this.req.status);
        }
        this.restoreSubstitutedSubmitButtons();
        this.onAfterResponseProcessing();

    }


}

/**
*  Default sample loading message show function. Overrride it if you like.
*/
AjaxAnywhere.prototype.showLoadingMessage = function() {

    var div = document.getElementById("AA_" + this.id + "_loading_div");
    if (div == null) {
        div = document.createElement("DIV");

        document.body.appendChild(div);
        div.id = "AA_" + this.id + "_loading_div";

        div.innerHTML = "&nbsp;Loading...";
        div.style.position = "absolute";

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本到高清视频免费精品| 不卡的av网站| 视频一区在线视频| 亚洲免费观看高清在线观看| 亚洲欧洲日韩女同| 国产精品日日摸夜夜摸av| 国产精品美女一区二区三区| 国产精品美女久久久久久2018| 久久久久久免费毛片精品| 国产欧美日韩不卡免费| 国产欧美在线观看一区| 欧美激情一区二区三区不卡| 中文字幕亚洲一区二区va在线| 亚洲欧洲国产日韩| 国产精品三级久久久久三级| 亚洲欧美日韩国产成人精品影院| 亚洲欧美视频在线观看| 亚洲va欧美va国产va天堂影院| 亚洲成人中文在线| 美国欧美日韩国产在线播放 | 99视频精品在线| 99精品视频在线观看| 在线观看日韩av先锋影音电影院| 欧美日韩在线直播| 欧美xxxxx牲另类人与| 久久亚洲综合色一区二区三区| 国产喂奶挤奶一区二区三区| 亚洲日本va在线观看| 亚洲无人区一区| 久久国产成人午夜av影院| 国产福利91精品| 91行情网站电视在线观看高清版| 欧美日韩成人综合在线一区二区| 日韩欧美久久一区| 成人免费在线播放视频| 亚洲成a人v欧美综合天堂| 韩国精品一区二区| 欧美最猛性xxxxx直播| 精品欧美一区二区在线观看| 亚洲欧美激情在线| 黄色小说综合网站| 欧美日韩中文字幕一区二区| 久久久国产精品午夜一区ai换脸| 亚洲在线一区二区三区| 韩国女主播一区| 欧美日韩一级片在线观看| 国产日产亚洲精品系列| 亚洲成人免费在线观看| 丁香婷婷综合网| 欧美一级生活片| 亚洲男同1069视频| 懂色中文一区二区在线播放| 欧美一级艳片视频免费观看| 亚洲乱码国产乱码精品精98午夜| 国产精品亚洲第一区在线暖暖韩国 | 国产亚洲成av人在线观看导航| 亚洲人午夜精品天堂一二香蕉| 蜜桃视频一区二区三区 | 久久精品99国产精品日本| 99久久99久久综合| 日韩欧美精品在线视频| 水野朝阳av一区二区三区| 色又黄又爽网站www久久| 国产精品区一区二区三区| 久久精品国产秦先生| 欧美精选午夜久久久乱码6080| 亚洲免费成人av| 成人的网站免费观看| 国产欧美精品一区aⅴ影院| 精品一区二区三区在线播放视频 | 色哦色哦哦色天天综合| 国产精品乱码一区二三区小蝌蚪| 国产一区二区三区国产| 精品久久久久久最新网址| 看电影不卡的网站| 精品久久久久久综合日本欧美| 日韩不卡一区二区| 欧美乱妇一区二区三区不卡视频| 亚洲不卡在线观看| 欧美精三区欧美精三区| 全国精品久久少妇| 日韩午夜小视频| 极品少妇xxxx偷拍精品少妇| 精品国产91九色蝌蚪| 久久99精品一区二区三区三区| 欧美一级日韩不卡播放免费| 久久 天天综合| 久久精品人人做人人综合| 精品午夜久久福利影院| 久久久久久电影| 99久久99久久精品免费看蜜桃| 亚洲免费av高清| 欧美三级乱人伦电影| 日韩国产欧美一区二区三区| 欧美岛国在线观看| 国产成人免费视频网站 | 国产精品天干天干在线综合| 成人97人人超碰人人99| 亚洲激情男女视频| 91麻豆精品国产91久久久资源速度| 日本不卡123| 久久久影院官网| 91免费看`日韩一区二区| 午夜视黄欧洲亚洲| 精品福利一区二区三区 | 日韩二区在线观看| 国产日产亚洲精品系列| 一本到一区二区三区| 蜜桃av噜噜一区| 中文字幕一区二区三中文字幕| 欧美日韩国产高清一区二区三区| 国产一区二区三区高清播放| 亚洲精品高清在线| 精品99久久久久久| 欧美三级韩国三级日本三斤| 国产一区久久久| 洋洋成人永久网站入口| 亚洲精品在线观看网站| 91成人免费在线视频| 久久99久久久欧美国产| 亚洲精选免费视频| 2017欧美狠狠色| 欧美精品v日韩精品v韩国精品v| 国产一区二区三区最好精华液| 亚洲欧美日韩在线| 国产性色一区二区| 欧美高清你懂得| 91国偷自产一区二区三区观看| 精品一区二区三区免费| 亚洲成av人片| 亚洲女同一区二区| 国产偷国产偷亚洲高清人白洁| 欧美一区二区三区的| 91免费观看视频| 成人一级黄色片| 麻豆一区二区99久久久久| 亚洲午夜在线电影| 亚洲免费av网站| 最新国产成人在线观看| 国产色产综合色产在线视频| 日韩精品一区二区三区视频播放| 91久久精品国产91性色tv | 蜜桃av噜噜一区| 亚洲成人综合视频| 亚洲已满18点击进入久久| 中文字幕视频一区| 国产精品国产自产拍在线| 久久久亚洲精华液精华液精华液 | 激情文学综合插| 秋霞电影一区二区| 日本三级韩国三级欧美三级| 亚洲1区2区3区4区| 亚洲第一电影网| 亚洲成人激情综合网| 亚洲一区二区三区中文字幕 | 不卡av在线免费观看| 国产69精品久久久久毛片| 国产一区二区三区四区五区入口| 久久国产精品99精品国产| 久久成人免费电影| 国产在线视视频有精品| 国产一区二区三区在线观看精品| 国产精品一级在线| 成人午夜av电影| 97国产精品videossex| 欧亚一区二区三区| 91精品国产日韩91久久久久久| 日韩亚洲欧美在线观看| 精品国产凹凸成av人导航| 精品国产凹凸成av人导航| 国产视频一区不卡| 亚洲欧洲精品天堂一级| 亚洲高清三级视频| 日本欧美韩国一区三区| 韩国av一区二区三区| 成人小视频免费在线观看| 色视频一区二区| 欧美一级久久久久久久大片| 欧美精品一区男女天堂| 亚洲色图视频网| 视频一区欧美精品| 国产成人综合网站| 欧美在线视频你懂得| 久久综合色综合88| 亚洲精品一二三区| 老司机免费视频一区二区三区| 国产99久久久久| 欧美色图一区二区三区| 精品av久久707| 亚洲一区二区在线免费看| 麻豆中文一区二区| 99国产精品久| 欧美成人福利视频| 一区二区在线观看免费| 美女视频黄 久久| 91理论电影在线观看| 亚洲精品在线免费观看视频| 亚洲一区二区视频| 国产白丝精品91爽爽久久| 欧美精品欧美精品系列|