分页技术,marquee,cutstr

cellpadding 补白,是指单元格内文字与边框的距离
cellspacing 两个单元格之间的距离

<body style="margin:0px;padding:0px;">清除页面的周围的空白

浏览器状态栏上
<body οnmοuseοver="window.status='欢迎...';return true">

<a href="" alt=""><%=cutstr(rs("title"),25)%> 

<marquee scrollamount=1 direction=up width=180 οnmοuseοver=this.stop(); οnmοuseοut=this.start(); behavior="alternate"(默认为循环滚动)></marquee>

recordset的三个属性
pagesize  记录数,默认为10
pagecount 总页数
Absolutepage 当前页码
rs.recordset 记录总数

<% rs.pagesize=20
pagecount=rs.pagecount
page=int(request("page"))
if page<=0 then page=1
if request("page")="" then page=1
rs.absolutepage=page
%>


<% if rs.eof and rs.bof then
response.write("暂无文章")
else
for i=1 to rs.pagesize
%>

<tr style="line-height:30px;"><td width="20%" bgcolor="ffffff">&nbsp;[<%=rs("city")%>]</td><td width="60%" bgcolor="ffffff"><a href="show.asp?id=<%=rs("projectname")%>"><%=left(trim(rs("companyname")),18)%></a></td><td width="20%" bgcolor="ffffff"><%=left(rs("date"),10)%></td></tr>

<%
rs.movenext
if rs.eof then exit for
next
end if
%>

<table> <tr>
      <td width="60%"><% if page=1 and not page=pagecount then %>
        第一页 上一页 <a href="moreshow.asp?page=<%=page+1%>">下一页</a> <a href="moreshow.asp?page=<%=pagecount%>">最后一页</a>
      <td width="40%" colspan="2"><form action="moreshow.asp?page=<%=a%>" method="get" name="form1" id="form1">
        第<%=page%>页&nbsp;&nbsp;共<%=pagecount%>页&nbsp;&nbsp;
        <select name="select" size="1" onChange="javascript:window.location='moreshow.asp?page='+this.options[this.selectedIndex].value;">
          <option value="" seleted>页数</option>
          <%for a=1 to pagecount%>
          <option value=<%=a%> seleted><%=a%></option>
          <%next%>
        </select>
      </form></td>
      <% elseif page<>1 and not page=pagecount then%>
     <a href="moreshow.asp?page=1">第一页</a> <a href="moreshow.asp?page=<%=page-1%>">上一页</a> <a href="moreshow.asp?page=<%=page+1%>">下一页</a> <a href="moreshow.asp?page=<%=pagecount%>">最后页</a>
      <td width="40%" colspan="2"><form action="moreshow.asp?page=<%=a%>" method="get" name="form1" id="form1">
        第<%=page%>页&nbsp;&nbsp;共<%=pagecount%>页&nbsp;&nbsp;
        <select name="select" size="1" onChange="javascript:window.location='moreshow.asp?page='+this.options[this.selectedIndex].value;">
          <option value="" selected seleted>页数</option>
          <%for a=1 to pagecount%>
          <option value=<%=a%> seleted><%=a%></option>
          <%next%>
        </select>
      </form></td>
      <% elseif page=pagecount then %>
      <a href="moreshow.asp?page=1">第一页</a> <a href="moreshow.asp?page=<%=page-1%>">上一页</a> 下一页 最后页
      <td width="1"></td>
      <td width="40%" colspan="2"><form action="moreshow.asp?page=<%=a%>" method="get" name="form1" id="form1">
        第<%=page%>页&nbsp;&nbsp;共<%=pagecount%>页&nbsp;&nbsp;
        <select name="select" size="1" onChange="javascript:window.location='moreshow.asp?page='+this.options[this.selectedIndex].value;">
          <option value="" seleted>页数</option>
          <%for a=1 to pagecount%>
          <option value=<%=a%> seleted><%=a%></option>
          <%next%>
        </select>
      </form>
          <%End if %>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值