作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要知道用户计算机上是否安装了 MS Office 2013 以使用特定方式打开 Office 文档以从网站进行编辑。
也许有一些特定于 Office 2013 的插件/activex?
我试图找出 Sharepoint 是如何完成这项任务的,但它太棘手了:
this.IsProtocolHandlerEnabled = function(d) {
if (IsStrNullOrEmpty(d))
return false;
if (b[d] != null)
return b[d];
if (c)
return a;
...
如果 Office 2013 可用,“a”等于“true”,否则为“false”,但我找不到更改变量“a”的位置。
最佳答案
这个方法在 chrome 中对我有用,你可能需要简化 IE 的旧副本的迭代:
var has2013=([].slice.call(navigator.plugins)
.filter(function(a){return a.name.match("Microsoft Office")})[0].name||"")
.match(2013)||false;
alert(has2013);
关于javascript - 如何在 javascript 中检测已安装的 MS Office 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17704925/
我是一名优秀的程序员,十分优秀!