asp多张图片竖向显示分页代码
下面是代码:<%page1=request.querystring("page1")ifpage1=""thenpage1=1endif'文章正文部分txt1="abcd...
下面是代码:
<%
page1 = request.querystring("page1")
if page1 = "" then
page1=1
end if
'文章正文部分
txt1 = "abcdef分割符ghij分割符klmnopqr分割符stuvwxy分割符z"
'利用split得出共有多少页
allpage1 = split(txt1,"分割符")
'显示正文
response.write allpage1(page1-1)&"<br /><br />"
for i=1 to ubound(allpage1)+1
response.write "<a href=""?page1="&i&""">第"&i&"页</a> "
next
%>
如代码所示:txt1 = "abcdef分割符ghij分割符klmnopqr分割符stuvwxy分割符z" 。这一句是显示的内容,我想把这个内容替换掉。<%=LParticular%>换成这个,该怎么写?<%=LParticular%>这是图片的显示代码。
请懂ASp的高手们帮帮忙,在线急等。 展开
<%
page1 = request.querystring("page1")
if page1 = "" then
page1=1
end if
'文章正文部分
txt1 = "abcdef分割符ghij分割符klmnopqr分割符stuvwxy分割符z"
'利用split得出共有多少页
allpage1 = split(txt1,"分割符")
'显示正文
response.write allpage1(page1-1)&"<br /><br />"
for i=1 to ubound(allpage1)+1
response.write "<a href=""?page1="&i&""">第"&i&"页</a> "
next
%>
如代码所示:txt1 = "abcdef分割符ghij分割符klmnopqr分割符stuvwxy分割符z" 。这一句是显示的内容,我想把这个内容替换掉。<%=LParticular%>换成这个,该怎么写?<%=LParticular%>这是图片的显示代码。
请懂ASp的高手们帮帮忙,在线急等。 展开
展开全部
<%
function LParticular(num)
dim rs,sql
set rs = Server.CreateObject("adodb.recordset")
sql = "select top "&num&" * from [表名] where [条件] = [条件] order by [排序]"
rs.open sql,conn,1,1
LParticular = ""
if rs.eof then
Response.Write("没有东西")
else
do while not rs.eof
LParticular = LParticular & rs(1) & "分隔符"
rs.movenext
loop
end if
rs.close
set rs = nothing
page1 = request.querystring("page1")
if page1 = "" then
page1=1
end if
'文章正文部分
txt1 = Lparticular(这里填数字,显示多少条记录)
'利用split得出共有多少页
allpage1 = split(txt1,"分割符")
'显示正文
response.write allpage1(page1-1)&"<br /><br />"
for i=1 to ubound(allpage1)+1
response.write "<a href=""?page1="&i&""">第"&i&"页</a> "
next
%>
function LParticular(num)
dim rs,sql
set rs = Server.CreateObject("adodb.recordset")
sql = "select top "&num&" * from [表名] where [条件] = [条件] order by [排序]"
rs.open sql,conn,1,1
LParticular = ""
if rs.eof then
Response.Write("没有东西")
else
do while not rs.eof
LParticular = LParticular & rs(1) & "分隔符"
rs.movenext
loop
end if
rs.close
set rs = nothing
page1 = request.querystring("page1")
if page1 = "" then
page1=1
end if
'文章正文部分
txt1 = Lparticular(这里填数字,显示多少条记录)
'利用split得出共有多少页
allpage1 = split(txt1,"分割符")
'显示正文
response.write allpage1(page1-1)&"<br /><br />"
for i=1 to ubound(allpage1)+1
response.write "<a href=""?page1="&i&""">第"&i&"页</a> "
next
%>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询