我有很多HTML代码,我想将它们包含在另一个HTML页面中。我是否可以通过创建自己的自定义标记并将其包含在目标HTML页面中来实现此目的?如果没有,有哪些可能的选择?
例如,
<sample-tag /> <!-- contains another set of HTML code -->谢谢。
发布于 2013-08-19 16:48:10
复制自:here
a.html
<html>
<head>
<script>
$(function(){
$("#includedContent").load("b.html");
});
</script>
</head>
<body>
<div id="includedContent"></div>
</body>
</html>b.html
<p> This is my include file </p>https://stackoverflow.com/questions/18309581
复制相似问题