强制/鼓励用户使用 Internet Explorer 查看 Sharepoint 站点

发布于 2024-12-11 07:54:57 字数 311 浏览 0 评论 0原文

好吧,Sharepoint 的经验非常有限,所以请保持温柔......!

我们正在 Intranet 上为少量用户运行 Sharepoint 2007。据我所知,在管理文档、签入和签出内容等方面,Sharepoint 在 Internet Explorer 中的表现要好得多,因为它有 ActiveX 插件。

因此,作为训练我们的用户使用IE打开网站的一种方式,是否可以在用户使用非IE浏览器访问网站时弹出一条消息,要求他们使用IE。也许我可以在页面中插入一段 JavaScript 代码,或者也许有一些选项或技术可以实现这一点。

提前致谢。

Okay, very limited experience with Sharepoint, so please be gentle...!

We are running Sharepoint 2007 on our intranet for a smallish number of users. From what I can tell, when it comes to managing documents, checking stuff in and out etc, Sharepoint just works a lot better in Internet Explorer because of the ActiveX plugin.

Therefore, as a way to train our users to open the site with IE, is it possible to popup a message when the user visits the site with a non-IE browser, to ask them to use IE. Maybe I can insert a snippet of JavaScript into the page or maybe there is some option or technique available to make this happen.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

留一抹残留的笑 2024-12-18 07:54:57

是的,如果您发现一个 javascript 完全可以做到这一点,您可以通过将代码粘贴到内容编辑器 Web 部件(带有标记)中(可以将其添加到页面中)轻松地将其包含在 SharePoint 中。

yes, if you find a javascript that does exactly that, you can easily include it in SharePoint by pasting the code in a Content Editor WebPart (with the tag) which you can add to your page.

痕至 2024-12-18 07:54:57

首先,谢谢你提出这个问题。我本来也想做这个,结果忘记了:)
现在我为你和我都找到了答案...

Javascript 会为你做这件事。在内容编辑器 Web 部件(在单个页面上)中或通过修改母版页(这将通知您所有使用此母版页的网站)。

w3schools 有如何获取浏览器信息的基本数据,但我认为
网页有更多相关信息。

我决定为自己制作一个脚本,并对其进行测试:

 if (!/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
    alert("This is not IE!");
 }

我刚刚将其添加到我们公司的 MOSS 2007 站点中:(我们的站点使用 jQuery)

<span id="alert" style="position:absolute; top:0; left: 250px; width: 300px; background-color: #ee2211; color: white; text-align: center; valign: middle; height: 50px; font-size: 13pt;">Attention: This is not (recomended) IE browser! <b>(x)</b></span> 
<script language="javascript" type="text/javascript" src="../../Miscellaneous/jquery-1.4.4.min.js"></script>
<script language="javascript" type="text/javascript" src="../../Miscellaneous/jquery.SPServices-0.5.8.min.js"></script> 
<script language="javascript">
    $("#alert").click(function () {
        $(this).hide();
    });
    $(document).ready(function() {
        if ($.browser.msie){
            $("#alert").hide();
        }
    });
</script>

First of all, thank you for this question. I was thinking of doing this asswell and forgot :)
Now I got the anwser for you and me both...

Javascript will do it for you. Either in content editor webpart (on single page) or by modifying master page (this will inform you in all the sites that uses this master page).

w3schools have basic data how to get browser information, but i think that
this webpage has more info about it.

I decided to make a script for myself, and tested it:

 if (!/MSIE (\d+\.\d+);/.test(navigator.userAgent)){
    alert("This is not IE!");
 }

I just added this to our company MOSS 2007 site: (our site use a jQuery)

<span id="alert" style="position:absolute; top:0; left: 250px; width: 300px; background-color: #ee2211; color: white; text-align: center; valign: middle; height: 50px; font-size: 13pt;">Attention: This is not (recomended) IE browser! <b>(x)</b></span> 
<script language="javascript" type="text/javascript" src="../../Miscellaneous/jquery-1.4.4.min.js"></script>
<script language="javascript" type="text/javascript" src="../../Miscellaneous/jquery.SPServices-0.5.8.min.js"></script> 
<script language="javascript">
    $("#alert").click(function () {
        $(this).hide();
    });
    $(document).ready(function() {
        if ($.browser.msie){
            $("#alert").hide();
        }
    });
</script>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文