简体   繁体   English

我想要获取文件输入并将其保存到本地路径的 Javascript

[英]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.

相关问题 当我使用javascript从网站保存图像时,如何将图像保存在我想要的本地路径中? - how can i save images in local path where i want when i save the images from website using by javascript? 如何打开要在其中运行javascript的Ghost本地html文件? - How do I open a Ghost local html file in which I want to run javascript? 我想使用 javascript 录制音频输入并将其保存到磁盘 - I want to record audio input using javascript and save it to disk 我想使用文件上传选项将多个图像路径保存到mysql数据库吗? 我正在使用将其他数据也输入数据库的表单 - I want to save multiple images path to a mysql database using file upload option? I am using a form which inputs other data to the database as well 我想将一个文本输入字段保存到本地存储中,然后在另一个页面上显示该值。html - I want to save a text input field into local storage and then display the value on an other .html page 我可以使用 JavaScript 中的本地路径在 GoogleMaps 中添加 KML 文件吗? - Can I add a KML file in GoogleMaps with a local path in JavaScript? Javascript:从特定路径读取本地文本文件,而无需XMLHttpRequest和输入类型文件 - Javascript: Reading local text file from specific path without XMLHttpRequest and without input-type-file 在javascript中输入完整文件名时如何获取文件路径? - How to get file path when I input a full filename in javascript? JSPDF保存在本地系统上,但我想将其保存在服务器上 - JSPDF is save on the local system but i want to save it on the server 是否可以使用 html 上的输入值保存文本并使用 JavaScript 写入本地 txt 文件? - Is it possible to save texts from input value on html and write on local txt file by using JavaScript?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM