get text from another file js code example
Example 1: html get text from file
<embed src="file.txt"> // This will show the text contained in file.txt in the page
Example 2: javascript load content from file
//with JQuery
jQuery.get('http://localhost/foo.txt', function(data) {
alert(data);
});