如何避免在IE7和IE8下拉ActiveX警告? [英] How do you avoid the drop-down ActiveX warning in IE7 and IE8?

查看:193
本文介绍了如何避免在IE7和IE8下拉ActiveX警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用javascript来启用对hss页面上某些项目悬停的CSS更改。在Firefox中我从来没有得到ActiveX消息,但在IE8我收到一条消息,说明为了帮助保护您的安全,Internet Explorer已限制此网页运行脚本或ActiveX控件,可以访问您的计算机点击这里选项... 'm假设它是因为我有:

I am currently using javascript to enable changes to css on hover for certain items in my html page. In Firefox I never get an ActiveX message but in IE8 I get a message stating "To help protect your security, Internet Explorer has restricted this webpage from running scripts or ActiveX controls that could access your computer. Click here for options..." I'm assuming its because of the javascript I have:

sfHover = function() {
    var sfEls = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

悬停效果在IE8中仍然有效,无需点击警告并允许ActiveX。

The hover effects still work in IE8 without me clicking on the warning and allowing ActiveX.

我的问题是:
1)有什么办法让我更改我有悬浮效果的JavaScript,所以ActiveX警告不弹出?
2)是否有代码禁用ActiveX警告,因为网站在IE中工作正常,即使有警告吗?

My questions are: 1) Is there a way for me to change the javascript I have in place for the hover effects so the ActiveX warning doesn't pop up? 2) Is there code to disable the ActiveX warning since the website works fine in IE even with the warning?

谢谢

推荐答案

这是由本地磁盘文件系统而不是webserver打开时的默认安全限制。换句话说,当您更改浏览器配置中的安全限制或由(本地)网络服务器(如) http://localhost/test.html

That's the default security restriction when you open it by local disk file system instead of by webserver. In other words, it won't occur when you change the security restrictions in the browser configuration or serve it by a (local) webserver like http://localhost/test.html


在Firefox中我从未得到ActiveX消息

In Firefox I never get an ActiveX message

ActiveX是MSIE专有的,你确实不会在除了MSIE之外的浏览器上看到这个。

ActiveX is MSIE proprietary, you indeed won't ever see this on browsers other than MSIE.

这篇关于如何避免在IE7和IE8下拉ActiveX警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆