为什么IE限制本地HTML页面的JavaScript文件? [英] Why does IE restrict the JavaScript files of local HTML pages?

查看:447
本文介绍了为什么IE限制本地HTML页面的JavaScript文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么IE在我们打开本地html文件时会限制JavaScript文件的运行?消息说:

Why does IE restrict JavaScript files from working when we open a local html file? The message says:

为了保护您的安全,Internet Explorer已限制此网页运行可以访问您计算机的脚本或ActiveX控件。单击此处查看选项

"To help protect your security, Internet explorer has restricted this web page from running scripts or ActiveX controls that could access your computer. Click here for the options"

谁能告诉我如何摆脱这个?

Can anyone tell me how get get rid of this?

推荐答案

查看 http://msdn.microsoft.com/en-us /library/ms537628(v=vs.85).aspx

如果您想在Internet区域中运行,请将其添加到您的HTML源代码中:

If you want to run in the Internet zone add this to your HTML source:

<!-- saved from url=(0014)about:internet -->

如果您想在Intranet区域中运行,请将其添加到您的HTML源:

If you want to run in the Intranet zone add this to your HTML source:

<!-- saved from url=(0016)http://localhost -->

要么停止显示消息并允许JavaScript执行。

Either will stop the message from displaying and allow JavaScript to execute.

这也可以让文件在其他PC上打开,而无需更改Internet Explorer选项。

This will also allow the file to open on other PC's without having to change Internet Explorer options.

这篇关于为什么IE限制本地HTML页面的JavaScript文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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