﻿//利用Ajax调用AjaxPage.aspx将来源URL保存在Session中
    function makeAjaxCall(sourceURL) {
            var xmlHttpObject = null;
            var webURL="/Utility/SourceURL/save_SourceURL.aspx?SourceURL=";
            try {
                xmlHttpObject = new XMLHttpRequest();
            }
            catch (ex) {
                // Internet Explorer

                try {
                    xmlHttpObject = new ActiveXObject('Msxml2.XMLHTTP');
                }
                catch (ex) {
                    xmlHttpObject = new ActiveXObject('Microsoft.XMLHTTP');
                }
            }
            if (xmlHttpObject == null) {
                //window.alert('AJAX is not available in this browser');
                return;
            }
            xmlHttpObject.open("GET", webURL + sourceURL, false);
            xmlHttpObject.send();
            //var xmlText = xmlHttpObject.responseText;
            //return xmlText;
        }
        
var str_SourceURL="";
str_SourceURL=document.referrer; //获取来源URL
if(str_SourceURL==null||str_SourceURL=="")
{
    str_SourceURL=document.location.href;//获取当前页面URL
}
//alert(str_SourceURL);
makeAjaxCall(str_SourceURL);
