如何使用jquery附加整个html文件 [英] How to append a whole html file with jquery
本文介绍了如何使用jquery附加整个html文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个像这样的html文件,
I got a html file like this,
<!DOCTYPE html>
<html lang="en">
<head>
//some content
</head>
<body>
//some content
</body>
</html>
我的问题是如何使用jquery整个加载这个文件。我尝试使用
追加函数,但它没有用。我搜索了解决方案已经有一段时间了,但是发现了很多方法来附加html文件的某些部分,比如meta,link,not整个文件。
My question is how to load this file as a whole with jquery. I tried it with append function, but it didn't work.. I searched for the solution for quite a while, but just found a lot of methods to append some parts of html file, like meta, link, not a whole file.
我可以用jquery吗?
Can I do it with jquery?
推荐答案
index.html或其他
<iframe src="filename.html"></iframe>
filename.html
<!DOCTYPE html>
<html lang="en">
<head>
//some content
</head>
<body>
//some content
</body>
</html>
这篇关于如何使用jquery附加整个html文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文