0

When using PHP, I write:

<?php include('foo.html');?> <?php include('bar.html');?>

I tried jQuery, but I am not satisfied as I have to specify the container where I have to load the HTML page.

$('.container').load('foo.html');

I need the same result as PHP, but using JavaScript. And load more than one file.

Any help

2
  • What about reading the docs? api.jquery.com/load Commented Feb 8, 2017 at 16:40
  • Agnelio, if an answer provided a solution, please accept it so the post is resolved. Commented Apr 17, 2019 at 21:20

1 Answer 1

-1

I found something that might match what you are looking for

How can I load multiple html files from a folder into a div

Query load multiple html files in one element

Sign up to request clarification or add additional context in comments.

1 Comment

Link-only answers aren't considered valuable on SO. Please provide the essence of the solution here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.