var XMLHttpReq; function createXMLHttpRequest() { if(window.XMLHttpRequest) { XMLHttpReq = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { XMLHttpReq = new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) { try { XMLHttpReq = new ActiveXObject('Microsoft.XMLHTTP'); } catch (e) {} } } } function sendRequest() { createXMLHttpRequest(); var url = "/saveSession.jsp"; XMLHttpReq.open('GET', url, true); XMLHttpReq.send(null); } function BrowserType() { var userAgent = navigator.userAgent; var isOpera = userAgent.indexOf('Opera') > -1; var isFF = userAgent.indexOf('Firefox') > -1; var isSafari = userAgent.indexOf('Safari') > -1 && userAgent.indexOf('Chrome') == -1; var isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Safari') > -1&&!isEdge; var isIE = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1; var isEdge = userAgent.indexOf('Edge') > -1 && !isIE; var isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1; if(!isIE) { alert('提示:本系统支持IE浏览器及搜狗、360浏览器的兼容模式;请使用适用浏览器! \nThis system supports the IE browser. Please use the IE get access to this website.'); sendRequest(); } } BrowserType();