代码如下:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base >
<title></title>
<script>
function bro(){
var is360 = false
var isIE = false
if (window.navigator.appName.indexOf("Microsoft") != -1){
isIE= true
}
if(isIE&&(window.navigator.userProfile+'')=='null'){
is360 = true
}
if(is360){
document.body.innerText = '360浏览器'
}else if(isIE){
document.body.innerText = 'IE浏览器'
}
}
</script>
</head>
<body onload="bro()">
</body>
</html>
360安全浏览器主要是使用了IE的内核。360只是个壳儿,判断不出来。只能判断到是不是IE的内核。用
if(window.navigator.userAgent.indexOf("MSIE") > -1){//是IE内核
}else{
//不是IE内核
}