in JavaScript by
How To Read And Write A File Using Java Script?

1 Answer

0 votes

This can be done in two ways which are discussed below,

1.      Using an ActiveX objects (Internet Explorer only)

Using ActiveX objects, following should be included in the code to read a file

var fso = new ActiveXObject("Scripting.FileSystemObject");

var s = fso.OpenTextFile("C:\\example.txt", 1, true);

2.      By the use of JavaScript extensions which runs from the Java Script editor.

In JavaScript Extensions,

fh = fopen(getScriptPath(), 0); to open a file

Related questions

0 votes
asked Apr 5, 2020 in Docker by ryan harris
0 votes
asked Oct 30, 2020 in Python by sharadyadav1986