您好我正在尝试找到一种方法来从基于 swiffy 的 html5 交互中重定向不受支持的浏览器。
不幸的是,我没有浏览器/功能检测的经验,所以我的代码只有一个基本框架:
// this line would confirm compatible browser is present and sends to a swiffy html5 page:
if(navigator.appName == "Chrome 18.0+" || "Firefox 4+" || "Safari 5.1+" || "Internet Explorer 9+" || "Opera 12+" || "Mobile Safari iOS 5+" || "Android 4.0.3+")
{
window.location = "timeline_web.html"
}
else{
// this line sends other browsers to fallback .png based version:
window.location = "timeline_web_fallback.html"
}
如果您知道如何设置它,我将非常感激!希望你能帮忙