如何判断谷歌浏览器:
var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1;
if(isChrome){
if(windowFrame1.src==""&&MapAPI==null){
windowFrame1.src="http://localhost:8080/x5/UI/gisTheme/map.html?random=" + Math.floor(Math.random()*100000);
}
}else{
if(windowFrame1.location.href=="about:blank"&&MapAPI==null){
windowFrame1.location.href = "http://localhost:8080/x5/UI/gisTheme/map.html?random=" + Math.floor(Math.random()*100000);
}
}
//IE 和非IE
var bsessionid = location.hash.replace('#','');
document.cookie="JSESSIONID="+bsessionid;
if(window.addEventListener){
window.addEventListener('hashchange',function(){
var bsessionid = location.hash.replace('#','');
document.cookie="JSESSIONID="+bsessionid;
},false);
}else if(window.attachEvent){
window.attachEvent('onhashchange',function(){
var bsessionid = location.hash.replace('#','');
document.cookie="JSESSIONID="+bsessionid;
});
}