Hulk
Hulk

Reputation: 34180

Display contents of a file

There is a file as data.html. How to display the contents of this file using JavaScript or jQuery?

Upvotes: 0

Views: 1448

Answers (2)

Rog
Rog

Reputation: 4085

jquery:

$('#somediv').load("data.html");

Upvotes: 1

Reigel Gallarde
Reigel Gallarde

Reputation: 65264

You could:

$('div#result').load('data.html');

please see details here.

Upvotes: 3

Related Questions