Hardcode File Path Instead Of Manual File Input
I want to read a text file using Javascript. For passing the FileList Object, the available codes use the with change event, but i want the path of the tx
Solution 1:
You can't. Access to files on the user's system requires that the user picks them explicitly as a security measure.
Solution 2:
You cannot browse on the clients disk files. Javascript does not allow. Until and unless a user selects a file you do not have access to the clients (user) file system. However, once the user selects a file you can read the contents of the file. Refer this answer:
JS: Submit HTML file and place file code within div
Post a Comment for "Hardcode File Path Instead Of Manual File Input"