Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 通过 javascript 检测 ipad/iphone webview
从本机移动应用程序 web 视图访问时,我需要禁用我们移动网站上的脚本。
是否有可用于从客户端定位 iOS UIWebView 的 javascript 条件语句?
这是解决方案,感谢@nivas:
var is_uiwebview = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent);