有没有办法在纯 HTML 中创建与 ASP.NET 中的主页面/内容页面类似的想法?
我想用 HTML 创建多个页面,但我希望所有页面看起来都相同,但有些内容不同。有没有办法在不创建多个彼此非常相似的页面的情况下做到这一点?
//wait until the dom is loaded
$(document).ready(function () {
//adds menu.html content into any "#menu" element
$('#menu').load('menu.html');
});
参考其他一些答案,应谨慎谨慎地使用 iframe。http://rev.iew.me/help-moving-from-iframes http://rev.iew.me/help-moving-from-iframes
http://fsvieira.com/2013/06/11/iframes-bad-for-a-website/ http://fsvieira.com/2013/06/11/iframes-bad-for-a-website/
此处重复问题及其答案:如何使用 HTML 创建母版页? https://stackoverflow.com/questions/18464326/master-pages-technique-in-pure-html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)