[英]I want Javascript which gets the file input and save it to local path
I want Javascript which gets the file input and save it to local path我想要获取文件输入并将其保存到本地路径的 Javascript
<input type="file" name="attachment1" id="attachment1" style="width:500;">
<script>
//Javascript--variable to assign the above file and its name
//Then save it to local path(some where in C drive)
</script>
JavaScript is a language that, usually, runs on your local machine. JavaScript 是一种通常在本地机器上运行的语言。 Therefore you are sending a potential thread to the pc your code runs on, every time you send that pc some JavaScript.因此,每次向该 PC 发送一些 JavaScript 时,您都会向运行代码的 PC 发送一个潜在线程。
In order to prevent abuse, computers are protected from doing harmfull stuff like automatically download virusses and store them somewhere on your C drive.为了防止滥用,计算机受到保护,不会做有害的事情,例如自动下载病毒并将它们存储在 C 驱动器的某个位置。
If you want to save it on the server however, have a look into Node.js.但是,如果您想将其保存在服务器上,请查看 Node.js。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.