当在IE中打开本地html文件时,如果html中含有javascript脚本,则会跳出IE信息栏,内容如下
"为帮助保护您的安全,Internet Explorer已经限制此文件显示可能访问您的计算机的活动内容。单击此处查看选项..."
要想以后不提示,这时可在html源码中标记之前添加类似下面这行来解决(括号里面的0008是URL后面跟的字符的长度)
<!-- saved from url=(0008)file:/// -->
这句话的作用是让 Internet Explorer 使用Internet区域的安全设置,而不是本地计算机区域的设置
当 Internet Explorer 打开 *.html 时,Internet Explorer 将查找“saved from URL”注释,并使用适合该 URL 的区域设置来确定对该 Web 页应用哪种安全策略。
在你做网页时,如果网页需要运行ActiveX或脚本,并且他们位于客户端以外的地方, 那么可以添加这个注释语句,IE当然不会不理他, IE会按照他指出的URL去找脚本的位置。
下面是个例子:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0008)file:/// -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
<script src="md5.js"></script>
</head>
<script type="text/javascript">
document.write("text" + "<br />")
document.write(hex_md5("123456") + "<br />")
</script>
<body >
</body>
</html>
Last modified by vkill on2008/10/30 09:53
Quotation
"为帮助保护您的安全,Internet Explorer已经限制此文件显示可能访问您的计算机的活动内容。单击此处查看选项..."
要想以后不提示,这时可在html源码中标记之前添加类似下面这行来解决(括号里面的0008是URL后面跟的字符的长度)
<!-- saved from url=(0008)file:/// -->
这句话的作用是让 Internet Explorer 使用Internet区域的安全设置,而不是本地计算机区域的设置
当 Internet Explorer 打开 *.html 时,Internet Explorer 将查找“saved from URL”注释,并使用适合该 URL 的区域设置来确定对该 Web 页应用哪种安全策略。
在你做网页时,如果网页需要运行ActiveX或脚本,并且他们位于客户端以外的地方, 那么可以添加这个注释语句,IE当然不会不理他, IE会按照他指出的URL去找脚本的位置。
下面是个例子:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0008)file:/// -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
<script src="md5.js"></script>
</head>
<script type="text/javascript">
document.write("text" + "<br />")
document.write(hex_md5("123456") + "<br />")
</script>
<body >
</body>
</html>
Last modified by vkill on2008/10/30 09:53
网友评论(0):


