运行在Internet Explorer中的本地'的Javascript家属'HTML文件 [英] Run local 'Javascript Dependant' HTML file in Internet Explorer

查看:241
本文介绍了运行在Internet Explorer中的本地'的Javascript家属'HTML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你打开一个本地的HTML文件(包含JavaScript)的使用Internet Explorer显示一条消息说

When you open a local HTML file (that contains Javascript) using Internet Explorer a message appears saying

Internet Explorer的限制此网页运行脚本或ActiveX控件

我的问题:有没有办法问IE或用户允许本地HTML文件运行JavaScript

我们正在分发,显示我们对HTML自动运行基于菜单的CD。菜单在用户浏览器中运行和CD(一个客制包,以便不是安装程序)上传递关于什么infromation。我们的菜单在很大程度上依赖于JQuery的所以不能够运行JavaScript并不好。我们选择使HTML菜单,CSS,Javascript来实现跨平台兼容性。

We are distributing a CD that displays our HTML based menu on AutoRun. The menu runs in the users browser and communicates infromation about whats on the CD (a Customisation Package so NOT an installer). Our menu relies heavily on JQuery so not being able to run Javascript is not good. We chose to make the menu in HTML, CSS, Javascript to achieve cross-platform compatibility.

有没有一种方法来自动从本地的HTML文件在IE浏览器运行JavaScript?

推荐答案

您想要的Web标记:

<一个href=\"http://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx\">http://msdn.microsoft.com/en-us/library/ms537628(v=vs.85).aspx

有三个版本。


  • &LT;! - 从URL =(0023)http://www.contoso.com/保存 - &GT;

  • &LT; - 从大约URL =(0014)保存:互联网 - &GT;

  • &LT; - 从URL保存=(0016)的http://本地主机 - &GT;

  • <!-- saved from url=(0023)http://www.contoso.com/ -->
  • <!-- saved from url=(0014)about:internet -->
  • <!-- saved from url=(0016)http://localhost -->

该格式是非常具体的,下降到安置和一个回车换行必须遵循结束 - 方式&gt;

The formatting is very specific, down to placement and that a carriage return and linefeed must follow the closing -->.

<!doctype html>
<!-- saved from url=(0023)http://www.contoso.com/ -->
<html>
  <head>
    <title>A Mark of the Web Example.</title>
  </head>
  <body>
     <p>Hello, World</p>
  </body>
</html>

这篇关于运行在Internet Explorer中的本地'的Javascript家属'HTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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