Vic*_*cky 0 javascript jquery jsp
我有3个索引页说
index_ch.jsp,index_ie.jsp,index_me.jsp
和一个名为的主要父页面
browserdetect.jsp
当用户第一次在browsere中输入我的url时,browserdetect.jsp会运行......我需要的是可以放入我的browserdetect.jsp的jquery或java脚本,它将首先检测用户使用的浏览器然后根据他或她使用的浏览器重定向到相应的索引页面......任何人都可以帮助我
将这个脚本添加到我的头部帮助我做我想做的事....感谢你帮助的人........
if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0))
{
window.location.replace("your page");
}
else if (navigator.userAgent.indexOf('Chrome') >= 0)
{
window.location.replace("your page");
}
else
{
window.location.replace("your page");
}
</script>
Run Code Online (Sandbox Code Playgroud)