我一直在谷歌搜索如何在我<head>
的另一个html页面中包含任何html文件,但我得到的只是PHP,我不想使用PHP,我和#39; d喜欢使用HTML,最后一种情况是JavaScript代码。
我的page.html:
<!DOCTYPE html>
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en" xmlns="http://www.w3.org/1999/xhtml" > <!--<![endif]-->
<head>
</head>
</html>
我的header.html:
<!DOCTYPE html>
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"> <!--<![endif]-->
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8" />
<title>Lucas - Web Developer</title>
<meta name="description" content="" />
<meta name="author" content="" />
<!-- CSS
================================================== -->
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<link href="http://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700|Roboto+Slab:300,400" rel="stylesheet" type="text/css" />
<!-- JS
================================================== -->
<script type="text/javascript" src="js/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="js/modernizr.custom.11889.js" type="text/javascript"></script>
<![endif]-->
<!-- HTML5 Shiv events (end)-->
<script src="js/mgmenu_plugins.js"></script>
<script src="js/mgmenu.min.js"></script>
<!-- Favicons
================================================== -->
<link rel="shortcut icon" href="images/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</html>
问题是:如何在page.html的<head>
中包含header.html?我已经尝试过ui:include / ui:insert但是效果不好(也许是我使用错误了)
谢谢! :)