Is there a way that we can include an HTML file into another HTML file with jQuery or Javascript? Thank you.
Asked
Active
Viewed 1,217 times
1 Answers
1
Use jQuery .load(). To load import.html into another file, just use:
$("#myElement").load("import.html");
yainspan
- 4,191
- 3
- 26
- 48
-
This method require Ajax right? – Lan Mai Feb 06 '17 at 20:51
-
yes, you use it uses jQuery's ajax – yainspan Feb 07 '17 at 02:20