如何在Javascript中将文件作为输入 [英] How to take the file as input in Javascript
本文介绍了如何在Javascript中将文件作为输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮助我......
如何将特定文本文件作为输入... ????
例如文件你好。 txt 我想在加载HTML页面时自动将此文件作为输入,文件仅存储在本地磁盘中...
Pls Help me...
How to take the particular text file as input...????
for example the File hello.txt I want to take this file as input automatically when loading the HTML page and file is stored in local Disk only...
推荐答案
由于安全原因,你不能这样做(除非你的网页没有在线托管,你在本地系统上运行JavaScript):
http://stackoverflow.com/a/11046973 [ ^ ]
这篇关于如何在Javascript中将文件作为输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文