jQuery load body from external HTML

后端 未结 5 966
南笙
南笙 2020-12-17 09:15

I\'m using jQuery and trying to load the body from an external HTML file.

It works if I try to load some div:

$(\'body\').load(\'example.h

5条回答
  •  一整个雨季
    2020-12-17 09:39

    I guess what you need is to add an iframe. Pass the URL to its src property. Your whole html will get loaded in this iframe then. A clean and simple solution for your problem. All the best :-)

提交回复
热议问题