How to put a whole html page in a div using jquery?

前端 未结 8 1548
暗喜
暗喜 2021-01-05 13:03

First of all I want everyone to know that I am absolute beginner so please be patient with me.

I want to know how am I going to put the entire html page in a div. I t

8条回答
  •  情歌与酒
    2021-01-05 13:22

    using your code you fill the html code with a constant string "footballplayer.html".

    You can use the load method, here is an example:

    $('#footballPlayers').load('footballplayers.html');
    

    it get via AJAX the page you request and fill the element.

提交回复
热议问题