footer.htm을 index.htm 파일에 넣으려고하고 있지만 지금까지 할 수 없습니다. 여기 내 코드가있다.html 내에 html 파일을 포함하는 방법
index.htm으로
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<p>This is my index page!</p>
<!--#include virtual="footer.htm" -->
<!--#include file="footer.htm" -->
</body>
</html>
footer.htm는
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<p>This is my footer</p>
</body>
</html>
나는 비주얼 스튜디오 내에서 2010 내장 웹 서버를 시도하고 나 또한 아파치하지만 행운 whatsoever.Please 노트를 통해 시도하는 내가 html5로 시도하십시오.
아니, 당신은 "HTML 5에 그것을 시도"하지 않는 (즉, HTM이 아닌 HTML.) 'DOCTYPE'은 HTML 5가 아닌 XHTML 1.0 Transitional을위한 것입니다. – derekerdmann
include가 포함 된 경우 footer.htm을 index.htm에 표시하려면 iframe에서이 작업을 수행하고''in index.htm –
나는 html5를 사용하지 않을 수도 있지만 스키마는 html5입니다. 또한 여러분의 솔루션으로 iframe을 목적으로 사용할 수 있습니다. 모든 페이지에 꼬리말과 머리글을 포함시키고 싶습니다 ... iframe 또는 다른 것을 사용해야합니까? – Ghaffar