asp生成html的方法???
假如有一个index.asp文件内容:<%@language=vbscript%><%ifnotsession("checked")="yes"thenresponse....
假如有一个index.asp文件内容:
<%@language=vbscript%>
<%if not session("checked")="yes" then
response.Redirect "login.asp"
else
%>
<html>
<title>管理界面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="conn.asp" -->
<title>邵武学生联盟共享相册</title>
<div id="append_parent">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<%
exec="select * from guest"
set M=server.createobject("adodb.recordset")
M.open exec,conn,1,1
if not M.eof then
mypage=request("whichpage")
if mypage="" then
mypage=1
else
mypage=cint(mypage)
end if
mypagesize=request("pagesize")
if mypagesize="" then
mypagesize=18
end if
M.movefirst
M.pagesize=mypagesize
maxcount=cint(M.pagecount)
M.absolutepage=mypage
how=1
y=M.pagecount
d=M.recordcount
else
Response.Write "<p><div align='center'><IMG src='../images/xx2.gif'/></div></p>"
end if
%>
<%
a=a+1
do while not M.eof and how <=M.pagesize
%>
<td><table border="0" align="center" cellpadding="0" cellspacing="0" class="l">
<!--DWLayoutTable-->
<tr>
<td align="center" valign="middle"><IMG src="../img.asp?src=<%=M("pic")%>" border=0 style="cursor:pointer;" onClick="zoom(this,'../img.asp?src=<%=M("pic")%>')" onload ='DrawImage(this)' /></td>
</tr>
<tr>
<td align="center" valign="middle"><a href="del.asp?id=<%=M("id")%>">ID:<%=M("id")%></a></td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table></td>
<%
if a mod 7=0 then
response.Write"<tr></tr>"
end if
M.movenext
how=how+1
a=a+1
loop
%>
</tr>
</table>
<table width="580" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><span style="font-family: "宋体"">
<%
if mypage<>1 then
response.write"<a href=right.asp> [第一页] </a>"
response.write"<a href=?whichpage="&(mypage-1)&"> [上一页] </a>"
end if
if mypage<>y then
response.write"<a href=?whichpage="&(mypage+1)&"> [下一页] </a>"
response.write"<a href=?whichpage="&y&"> [最后一页] </a>"
end if
%>
</span> 当前为<span class="STYLE2"><%=mypage%></span>页 共有<span class="STYLE2"><%=maxcount%></span>页 共有<span class="STYLE2"><%=d%></span>张图片</div></td>
</tr>
</table>
</div>
<%end if%>
如何生成html类型文件。给个具体实现方法啊。不要再粘贴网址了。
查了不少,看不太懂诶。 展开
<%@language=vbscript%>
<%if not session("checked")="yes" then
response.Redirect "login.asp"
else
%>
<html>
<title>管理界面</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="conn.asp" -->
<title>邵武学生联盟共享相册</title>
<div id="append_parent">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<%
exec="select * from guest"
set M=server.createobject("adodb.recordset")
M.open exec,conn,1,1
if not M.eof then
mypage=request("whichpage")
if mypage="" then
mypage=1
else
mypage=cint(mypage)
end if
mypagesize=request("pagesize")
if mypagesize="" then
mypagesize=18
end if
M.movefirst
M.pagesize=mypagesize
maxcount=cint(M.pagecount)
M.absolutepage=mypage
how=1
y=M.pagecount
d=M.recordcount
else
Response.Write "<p><div align='center'><IMG src='../images/xx2.gif'/></div></p>"
end if
%>
<%
a=a+1
do while not M.eof and how <=M.pagesize
%>
<td><table border="0" align="center" cellpadding="0" cellspacing="0" class="l">
<!--DWLayoutTable-->
<tr>
<td align="center" valign="middle"><IMG src="../img.asp?src=<%=M("pic")%>" border=0 style="cursor:pointer;" onClick="zoom(this,'../img.asp?src=<%=M("pic")%>')" onload ='DrawImage(this)' /></td>
</tr>
<tr>
<td align="center" valign="middle"><a href="del.asp?id=<%=M("id")%>">ID:<%=M("id")%></a></td>
</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table></td>
<%
if a mod 7=0 then
response.Write"<tr></tr>"
end if
M.movenext
how=how+1
a=a+1
loop
%>
</tr>
</table>
<table width="580" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><span style="font-family: "宋体"">
<%
if mypage<>1 then
response.write"<a href=right.asp> [第一页] </a>"
response.write"<a href=?whichpage="&(mypage-1)&"> [上一页] </a>"
end if
if mypage<>y then
response.write"<a href=?whichpage="&(mypage+1)&"> [下一页] </a>"
response.write"<a href=?whichpage="&y&"> [最后一页] </a>"
end if
%>
</span> 当前为<span class="STYLE2"><%=mypage%></span>页 共有<span class="STYLE2"><%=maxcount%></span>页 共有<span class="STYLE2"><%=d%></span>张图片</div></td>
</tr>
</table>
</div>
<%end if%>
如何生成html类型文件。给个具体实现方法啊。不要再粘贴网址了。
查了不少,看不太懂诶。 展开
6个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |