如何在本页操作

yymzzl 2006-08-26 12:23:02
<DIV class=body>
<DIV class="content odd"> <IMG
src="/Image/linkTransparent.gif" border=0> <A
href="asp.asp">ASP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="php.asp"> PHP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="/jsp.asp"> JSP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="vbscript.asp">VBScript</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="javascript.asp">JavaScript</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="delphi.asp">Delphi</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="c%2B%2B.asp">C++</A> </DIV>
</DIV></DIV>


<%
Dim sql
set rs = Server.CreateObject("ADODB.Recordset")
sql = "select author,title,[time],link,sort from program where sort='asp' order by time desc"
rs.Open sql,conn,1,1

For iPage = 1 To rs.PageSize
%>
<TR>
<td align=left width="17%" noWrap>
[<%=rs("sort")%>]
</td>
<td align=left width="46%" noWrap>
<A href="<%=rs("link")%>"><%=rs("title")%></A>
</td>
<td align=center width="17%" noWrap>
<%=rs("time")%>
</td>
<td align=right width="20%" noWrap>
<A href="getuserinf.asp"><%=rs("author")%></A>
</td>
</TR>
<%
rs.MoveNext
If rs.EOF Then Exit For
Next
%>
-----------------------------------------------------
如果我想在这一页操作 当我点ASP连接 就执行下面的 语句 搜索出sort=asp自段的集合
如果我点 PHP 也一样 我想在一个页面实现 有没有简单的方法
谢谢各位高手帮忙谢谢了!
...全文
88 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
leo963258 2006-08-26
<DIV class=body>
<DIV class="content odd"> <IMG
src="/Image/linkTransparent.gif" border=0> <A
href="?action=asp">ASP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="?action=PHP"> PHP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="?action=JSP"> JSP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="?action=VBScript">VBScript</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="?action=JavaScript">JavaScript</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="?action=Delphi">Delphi</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="?action=C++">C++</A> </DIV>
</DIV></DIV>


<%
Dim sql
set rs = Server.CreateObject("ADODB.Recordset")
sql = "select author,title,[time],link,sort from program where sort='"&Request("action")&"' order by time desc"
rs.Open sql,conn,1,1

For iPage = 1 To rs.PageSize
%>
<TR>
<td align=left width="17%" noWrap>
[<%=rs("sort")%>]
</td>
<td align=left width="46%" noWrap>
<A href="<%=rs("link")%>"><%=rs("title")%></A>
</td>
<td align=center width="17%" noWrap>
<%=rs("time")%>
</td>
<td align=right width="20%" noWrap>
<A href="getuserinf.asp"><%=rs("author")%></A>
</td>
</TR>
<%
rs.MoveNext
If rs.EOF Then Exit For
Next
%>
回复
penglewen 2006-08-26
注此文件命名为:cmplag.asp

<DIV class=body>
<DIV class="content odd"> <IMG
src="/Image/linkTransparent.gif" border=0> <A
href="cmplag.asp?id=asp">ASP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="cmplag.asp?id=php"> PHP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="cmplag.asp?id=jsp"> JSP</A><BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="cmplag.asp?id=vbscript">VBScript</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="cmplag.asp?id=javascript">JavaScript</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="cmplag.asp?id=delphi">Delphi</A> <BR>
<IMG
src="/Image/linkTransparent.gif" border=0> <A
href="cmplag.asp?id=c++">C++</A> </DIV>
</DIV></DIV>


<%
if request("id")<>"" then
Dim sql
set rs = Server.CreateObject("ADODB.Recordset")
sql = "select author,title,[time],link,sort from program where sort='"&request("id")&"' order by time desc"
rs.Open sql,conn,1,1

For iPage = 1 To rs.PageSize
%>
<TR>
<td align=left width="17%" noWrap>
[<%=rs("sort")%>]
</td>
<td align=left width="46%" noWrap>
<A href="<%=rs("link")%>"><%=rs("title")%></A>
</td>
<td align=center width="17%" noWrap>
<%=rs("time")%>
</td>
<td align=right width="20%" noWrap>
<A href="getuserinf.asp"><%=rs("author")%></A>
</td>
</TR>
<%
rs.MoveNext
If rs.EOF Then Exit For
Next
end if
%>
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2006-08-26 12:23
社区公告
暂无公告