open file with js code example
Example 1: javascript function to open file browser
const browseFiles = () => {
var input = document.createElement('input');
input.type = 'file';
input.click();
}
Example 2: javascript how to open a file
window.open("file:///D:/Hello.txt");