Write to text file instead of alert

 

Instead of an alert, I would like text to be written to a text file.

This code creates an alert: 

Alert(text);

Instead of that, how can I write the text to a file named "output.txt"?

 
hknight:

Instead of an alert, I would like text to be written to a text file.

This code creates an alert: 

Alert(text);

Instead of that, how can I write the text to a file named "output.txt"?

Use the File Functions