這是我通過google找到的腳本。我編輯了文件名。Javascript - 複製文件
這就是:
<html>
<head>File copy in progress...Don't close this page.</head>
<script type="text/javascript">
// initialize ActiveXObject and create an object of Scripting.FileSystemObject.
var fso = new ActiveXObject("Scripting.FileSystemObject");
// copies a file to another location + overwrites the file if already exits
fso.CopyFile("file1.txt", "file2.txt", 1);
fso = null;
</script>
</html>
但它不是抄襲什麼?事實上,它有可能在JavaScript中複製文件?
其中瀏覽器正在使用?這隻適用於IE瀏覽器,我猜測,只有在某些情況下。 – Joe
firefox和google chrome @Joe –
此外,您沒有正確使用'
'。此外,同步使用(我不知道API如何工作)會使瀏覽器非常不高興。 – Joe