[英]How to make a programming code box in html css bootstrap or angular js
如何在HTML CSS Bootstrap或angular js中制作编程代码框
One way is to use w3-include 一种方法是使用w3-include
<!DOCTYPE html>
<html>
<script src="https://www.w3schools.com/lib/w3data.js"></script>
<body>
<div w3-include-html="content.html"></div>
<script>
w3IncludeHTML();
</script>
</body>
</html>
<html>
<body>
<h1>Welcome to my home page!</h1>
<p>Some text.</p>
<p>Some more text.</p>
<?php include 'footer.php';?>
</body>
</html>
To complete, here's a JQuery style (thanks @Manivannan for the link) 要完成,这是一个JQuery样式(感谢@Manivannan提供的链接)
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"</script>
<script>
$(function(){
$("#headerDiv").load("header.html");
});
</script>
</head>
<body>
<div id="headerDiv"></div>
<!-- Rest of the code -->
</body>
</html>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.