我使用嵌入在Google网站上的谷歌日历。检测谷歌网站上的黑莓浏览器
黑莓用户正在报告错误,所以我想将它们重定向到另一页。
我尝试添加使用instructions provided here这个代码
<script type="text/javascript">
var ua = navigator.userAgent;
var url = "http://optimizedmobile.yoursite.com/";
if (ua.indexOf("BlackBerry") >= 0)
{
if (ua.indexOf("WebKit") >= 0)
{
window.location = url;
}
}
</script>
,但它不工作。我测试了我创建的html文件中的代码并且它可以工作。
那么,任何其他的想法包括在页面上的代码?您认为Google代码不支持该代码吗?
任何其他想法重定向BB用户?