怎样让JAVAWEB只用IE访问? 很多浏览器都有兼容问题,只有IE是正常的。因为造成 很多人用GB 遨游 绿色 360 等浏览器造成页面访问不正在,哪位高手有JSP代码控制 只允许IE访问的 帮忙。谢谢。!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果是判断IE和非IE内核的浏览器 可以用String isie = request.getHeader("User-Agent");然后判断isie是否包含字符串MSIE 你让拒绝IE的人,用linux的人情何以堪。。本人的IE就被卸载了。。只用chrome谁出这么馊主意,不说治本,连标也没治 LZ你IE6,7,8,9都试过了吗,说不定他们之间都不兼容哦! var Sys = {}; var ua = navigator.userAgent.toLowerCase(); window.ActiveXObject ? Sys.ie = ua.match(/msie ([\d.]+)/)[1] : document.getBoxObjectFor ? Sys.firefox = ua.match(/firefox\/([\d.]+)/)[1] : window.MessageEvent && !document.getBoxObjectFor ? Sys.chrome = ua.match(/chrome\/([\d.]+)/)[1] : window.opera ? Sys.opera = ua.match(/opera.([\d.]+)/)[1] : window.openDatabase ? Sys.safari = ua.match(/version\/([\d.]+)/)[1] : 0; if (Sys.ie && Sys.ie == "5.0") { alert("请使用 Microsoft Internet Explorer 6.0 及以上版本浏览器!"); } if (Sys.ie && Sys.ie == "6.0") { document.write('<body onload="loadIE6();"></body>'); } if (Sys.ie && Sys.ie == "7.0") { document.write('<body onload="loadIE7();"></body>'); } if (Sys.ie && Sys.ie == "8.0") { document.write('<body onload="loadIE8(); closeThis();"></body>'); } if (Sys.firefox) { // firefox alert("请使用 Microsoft Internet Explorer 6.0 及以上版本浏览器!"); } if (Sys.chrome) { // 谷歌浏览器 alert("请使用 Microsoft Internet Explorer 6.0 及以上版本浏览器!"); } linux下连接db2 9.7版本数据库问题 myeclipse突然不提示了类的方法名了 急求高手解决WEB网页开发问题 关于hibernate用原生sql做insert操作 求指点:腾讯新闻抓取,始终乱码问题? 那种向导式的表单的数据如何保存?类似上一步、下一步的表单 一早上都没看出问题在哪里 jsp 界面问题!!!!!急 关于Webwork中Ognl栈的读取问题 用distinct搜索数据库出的一个奇怪问题 jsp页面上怎么用jstl遍历HaspMap哦 Netbeans生成的war文件如何使用?
String isie = request.getHeader("User-Agent");
然后判断isie是否包含字符串MSIE
谁出这么馊主意,不说治本,连标也没治
var Sys = {};
var ua = navigator.userAgent.toLowerCase();
window.ActiveXObject ? Sys.ie = ua.match(/msie ([\d.]+)/)[1] :
document.getBoxObjectFor ? Sys.firefox = ua.match(/firefox\/([\d.]+)/)[1] :
window.MessageEvent && !document.getBoxObjectFor ? Sys.chrome = ua.match(/chrome\/([\d.]+)/)[1] :
window.opera ? Sys.opera = ua.match(/opera.([\d.]+)/)[1] :
window.openDatabase ? Sys.safari = ua.match(/version\/([\d.]+)/)[1] : 0; if (Sys.ie && Sys.ie == "5.0") {
alert("请使用 Microsoft Internet Explorer 6.0 及以上版本浏览器!");
}
if (Sys.ie && Sys.ie == "6.0") {
document.write('<body onload="loadIE6();"></body>');
}
if (Sys.ie && Sys.ie == "7.0") {
document.write('<body onload="loadIE7();"></body>');
}
if (Sys.ie && Sys.ie == "8.0") {
document.write('<body onload="loadIE8(); closeThis();"></body>');
}
if (Sys.firefox) {
// firefox
alert("请使用 Microsoft Internet Explorer 6.0 及以上版本浏览器!");
}
if (Sys.chrome) {
// 谷歌浏览器
alert("请使用 Microsoft Internet Explorer 6.0 及以上版本浏览器!");
}