【问题标题】:Is there any way to identify whether the current browser is JxBrowser有什么方法可以识别当前浏览器是否是JxBrowser
【发布时间】:2020-10-23 04:02:50
【问题描述】:

我正在使用 JxBrowser,如果浏览器是 JxBrowser,我希望避免在我的应用程序中使用某种逻辑。我在我的 javascript 中使用 navigator.userAgent,它在列表中不包含 JxBrowser,但显示 JxBrowser 的 chrome,因为它基于 chromium。希望有一些可以识别JxBrowser的api。

【问题讨论】:

  • 询问 JxBrowser 开发人员是否可以使用一些可以通过 User-agent 字符串识别 JxBrowser 的 uniq 字符串构建下一个版本的浏览器。我相信这不会有问题。或者问他们,他们会帮助你的。

标签: javascript jxbrowser


【解决方案1】:

这个怎么样?

<script>

   currentBrowser=navigator.appCodeName;
   alert(currentBrowser);

</script>

【讨论】:

  • @M Hasan Nudin,使用上面的脚本,它总是将 appCode 设为 'Mozzilla'
【解决方案2】:

@step 感谢指出正确的方向,我设法发现 JxBrowser 已经具有包含用户代理的功能 https://jxbrowser.support.teamdev.com/support/solutions/articles/9000013113-user-agent

【讨论】:

    猜你喜欢
    • 2012-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多