【发布时间】:2021-06-21 19:46:05
【问题描述】:
我试图将 html 文件包含在另一个 html 文件中,然后警告结果。
我在这里找到了解决方案。
Source
请问如何提醒 b.html 的内容而不是在 div 中调用它。
像
alert('b.html content here');
a.html:
<html>
<head>
<script src="jquery.js"></script>
<script>
$(function(){
$("#includedContent").load("b.html");
alert('b.html content here');
});
</script>
</head>
<body>
<div id="includedContent"></div>
</body>
</html>
b.html:
<p>This is my include file</p>
【问题讨论】:
标签: javascript html jquery