深圳江苏商会规模:在ASP中,我用文件调用,比如有一个TOP,ASP 和FOOT.ASP,我**********

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 03:35:46
在ASP中,我用文件调用,比如有一个TOP,ASP 和FOOT.ASP,我要在INDEX.ASP中调用,那么像HTML ,HEAD BODY,这样的标记该怎么写,有时候我在INDEX.ASP中写上这些标记,有时不写,但结果都正确,请问正规的写法是什么?????????

<!-- #include file="top.asp" -->
..
<%
..
%>
..
<body>
..
<%
..
%>
..
</body>
..
<!-- #include file="foot.asp" -->

top.asp↓
..
<%
..
%>
..
<html>
<head>
<title>标题</title>
</head>

foot.asp↓

..
<%
..
%>
..
</html>
..
<%
..
%>
..

asp语句放在<%..%>之间,可以在网页代码内任何地方插入<%..%>,需要根据你asp程序执行顺序来排列。

调用其他网页最好放在网页最上端:

<!-- #include file="top.asp" -->
..
<%
..
%>
..
<body>
..
</body>
..
<!-- #include file="foot.asp" -->

asp的语言在"<%" "%>"里

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<%
response.write "asp输出"
%>
<body>
</body>
</html>