如何关闭提示对话框

netlark 2003-03-18 11:32:32
function CreateFile()
{
var fso, tf;
fso = new ActiveXObject("Scripting.FileSystemObject");
tf = fso.CreateTextFile("c:\\testfile.txt", true);
// 写一行,并且带有新行字符。
tf.WriteLine("Testing 1, 2, 3.") ;
// 向文件写三个新行字符。
tf.WriteBlankLines(3) ;
// 写一行。
tf.Write ("This is a test.");
tf.Close();
}

使用以上代码时,操作FileSystemObject对象时
会提示"网页上的某些软件不安全,建议不要运行"
如何屏蔽该对话框
...全文
25 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
netlark 2003-03-18
  • 打赏
  • 举报
回复
我已经把级别调到最低了,把所有的ActiveX设为启用,还是不行
laily 2003-03-18
  • 打赏
  • 举报
回复
自定义设置里面有ActiveX的设置,设为允许即可。这样做小心你的电脑被黑
netlark 2003-03-18
  • 打赏
  • 举报
回复
我把Intranet和Internet的级别调到最低了
zhanghk 2003-03-18
  • 打赏
  • 举报
回复
up
gianfeng 2003-03-18
  • 打赏
  • 举报
回复
是的,包括internet和本地的哟。
孟子E章 2003-03-18
  • 打赏
  • 举报
回复
把你ie安全降低
netlark 2003-03-18
  • 打赏
  • 举报
回复
可以写的,就是会跳出对话框
孟子E章 2003-03-18
  • 打赏
  • 举报
回复
网页上不允许往本地写文件
netlark 2003-03-18
  • 打赏
  • 举报
回复
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<script language="JavaScript" type="text/JavaScript">
function CreateFile()
{
var fso, tf;
fso = new ActiveXObject("Scripting.FileSystemObject");
tf = fso.CreateTextFile("c:\\testfile.txt", true);
// 写一行,并且带有新行字符。
tf.WriteLine("Testing 1, 2, 3.") ;
// 向文件写三个新行字符。
tf.WriteBlankLines(3) ;
// 写一行。
tf.Write ("This is a test.");
tf.Close();
}
</script>
</head>
<body onload="CreateFile()"> //添加这句就会出错
</body>
</html>

我找到原因了,但我不知道该怎么改
netlark 2003-03-18
  • 打赏
  • 举报
回复
各位大侠,帮帮忙吧

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧