Reputation: 110
I was planning to construct an HTML file which takes the input from another file.
I want write an HTML file as follows:
<html>
.
.
//file content
.
</html>
File as follows:
<td> </td>
.
.
Is there a simple way to do this?
Upvotes: 0
Views: 48
Reputation: 3389
You can do it using the jQuery .load() function, but it is better to use another container rather than the HTML element tag. A div for example:
<div id="container">
</div>
And your JavaScript code using jQuery:
$('#container').load('path/to/your/file.html');
Upvotes: 1