V
V
Vasily Vasilyev2017-12-14 01:16:21
JavaScript
Vasily Vasilyev, 2017-12-14 01:16:21

Is it possible to import the contents of a .txt file into a block through js?

There is index.html:

...
<div id="content"></div>
...

Is it possible to include the contents of the file "./resourses/data.txt" in #content? If yes, how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel, 2017-12-14
@Basil_Dev

when using jQuery
$('#content').load('./resourses/data.txt');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question