function ajaxRequest(url_request, url_reload,msg) {
    var req;
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHttp");
    }
    if (req) {
        req.open("GET", url_request, true);
        req.onreadystatechange = function() {
            if (req.readyState == 4) {
                if (req.status == 200) {
                    if(msg){
                        alert(msg);
                    }
                    if (url_reload && url_reload!='') {
                        window.location.href = url_reload;
                    } else {
                        // window.location.reload();
                        if (window.location.href.indexOf("?") != -1) {
                            window.location.href = window.location.href + "&rid=" + Math.random() * 10000;
                        } else {
                            window.location.href = window.location.href + "?rid=" + Math.random() * 10000;
                        }
                    }
                } else {
                    alert("操作失败...");
                    //alert("服务端返回状态" + req.statusText);
                }
            } else {
                // document.getElementById("myTime").innerHTML = "数据加载中";
            }
        };
        req.send(null);
    }
}


