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

前端 未结 8 1564
暗喜
暗喜 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:18

    replace

    $("#directors").html("directors.html"); 
    

    with

    $("#directors").load("directors.html");
    

    the html file that you load should only contain the contents of the DIV - ie not the the or even the navigation - just the content

提交回复
热议问题