JS实验案例

<!--
<html>

<head>
<script type=" text/ javascript">

function file() {
var fso, f1;
fso=new ActiveXObject (" Scripting. FileSystemObject") ;
f1 = fso. createtextfile("C:\\1. txt ", true) ;
f1. write("这是一个文本文档");
f1. Close() ;
}
</script>

</head>

<body>
<button onclick=' file()' >创建一个文本文件</button>
</body>

</html>
-->
View Code

相关文章: