新闻详情

自动保存网页输出文本代码

3762 2009/5/19
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>标题页</title>
<script>
window.onload=function()
{
     document.open("text/html");                    //打开窗口
     document.write("把这些文字保存起来!!!!!");//输出内容
     document.execCommand("saveAs","true","我的网页");//打开另存为对话框
     document.close();                                //关闭文档
}
</script>
</head>
<body>
</body>
</html>

相关资讯

18973218026
返回顶部