zoukankan      html  css  js  c++  java
  • 兩個分頁的文件

    分頁的時候,調用只需要用INCLUDE進來就可以了

    <!--使用時請指定搜索字符串search_str這個可以為空,以及總頁數allpage和總記錄數RCount和this_pagesize-->
    <%if search_str="" then search_str="search_str=str"%>
    <SCRIPT>
    <!--
    function MM_jumpMenu(selObj,restore){ //v3.0
      eval(
    "location.href='<%=this_page%>?<%=search_str%>&p="+selObj.options[selObj.selectedIndex].value+"'");
      
    if (restore) selObj.selectedIndex=0;
    }
    //-->
    </SCRIPT>
    <style type="text/css">
    .page_link a {
        text
    -decoration: none;
        color:#0000FF;
    }
    .page_link a:visited {
        text
    -decoration: none;
        color:#0000FF;
    }
    .page_link a:hover {
        text
    -decoration: none;
        color:#FF0000;
    }

    .page_link a:active {
        text
    -decoration: none;
        color:#FF0000;
    }
    .page_num {
        background
    -color : #EDF5F9;
        ine
    -height : normal;
        border:1px solid #B4C6DA;
        font
    -family: "Courier New", Arial, sans-serif, "新細明體""細明體";
        height: 20px;
         25px;
        padding
    -top: 0px;
        padding
    -right: 2px;
        padding
    -bottom: 0px;
        padding
    -left: 2px;
        font
    -size: 12px;
        text
    -align: center;
        vertical
    -align: middle;
        } 
    .page_curnum {
        background
    -color : #68A6DD;
        border:1px solid #B4C6DA;
        padding
    -right:2px;
        color:#FFFFFF;
        font
    -family: "Courier New", Arial, sans-serif, "新細明體""細明體";
        text
    -align: center;
        vertical
    -align: middle;
        height: 20px;
         25px;
        font
    -size: 12px;
        font
    -weight: bold;
        } 
    .page_num_sel {
        background
    -color : #EDF5F9;
        ine
    -height : normal;
        border:1px solid #B4C6DA;
        font
    -family: "Courier New", Arial, sans-serif, "新細明體""細明體";
        height: 20px;
        padding
    -top: 0px;
        padding
    -right: 2px;
        padding
    -bottom: 0px;
        padding
    -left: 2px;
        font
    -size: 12px;
        text
    -align: center;
        vertical
    -align: middle;
        } 
    </style>

    <table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
      
    <tr valign="top">
        
    <td align="center">
            
    <div class="page_link">
            
    <%if p>0 then%>
              
    <%if allpage<>1 then%>
              
    <%if p>1 then%>
              
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=1" title="第一頁"><font face="Webdings">9</font></a></span>
                
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p-1%>" title="上一頁"><font face="Webdings">7</font></a></span>
          
    <%end if%>            
          
    <%
          quotient
    =int(p/10)
          remainder
    =(p mod 10)
          
    if remainder=0 then quotient=quotient-1
          
    for i=quotient*10+1 to (quotient+1)*10
            
    if i>allpage then exit for
          %
    >
            
    <%if p=then%>
                    
    <span class="page_curnum"><%=i%></span>
            
    <%else%>
                    
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=i%>" title="第<%=i%>頁"><%=i%></a></span>
          
    <%end if%>
          
    <%next%>
                
          
    <%if p<allpage then%>
                
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p+1%>" title="下一頁"><font face="Webdings">8</font></a></span>
          
                
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=allpage%>" title="最後一頁"><font face="Webdings">:</font></a></span>
                
    <%end if%>
                跳第
          
    <select name="p" class="page_num_sel" onChange="MM_jumpMenu(this,0)">
            
    <%for i=1 to allpage%>
            
    <option value="<%=i%>"<%if i=then response.write " selected"%>><%=i%></option>
            
    <%next%>
          
    </select>
                
    <%end if%>
                頁碼:
    <font color="red"><%=p%></font>/<font color="blue"><%=allpage%></font>&nbsp;
                記錄數:
    <font color="red"><%=this_pagesize%></font>/<font color="blue"><%=Rcount%></font>
                
    </div>
          
    <%end if%></td>
      
    </tr>
    </table>

    第二個

    <!--使用時請指定搜索字符串search_str這個可以為空,以及總頁數allpage和總記錄數RCount和this_pagesize-->
    <%if search_str="" then search_str="search_str=str"%>
    <SCRIPT>
    <!--
    function MM_jumpMenu(selObj,restore){ //v3.0
      eval(
    "location.href='<%=this_page%>?<%=search_str%>&p="+selObj.options[selObj.selectedIndex].value+"'");
      
    if (restore) selObj.selectedIndex=0;
    }
    //-->
    </SCRIPT>
    <style type="text/css">
    .page_link a {
        text
    -decoration: none;
        color:#0000FF;
    }
    .page_link a:visited {
        text
    -decoration: none;
        color:#0000FF;
    }
    .page_link a:hover {
        text
    -decoration: none;
        color:#FF0000;
    }

    .page_link a:active {
        text
    -decoration: none;
        color:#FF0000;
    }

    .page_num {
        background
    -color : #EDF5F9;
        ine
    -height : normal;
        border:1px solid #B4C6DA;
        font
    -family: "Courier New", Arial, sans-serif, "新細明體""細明體";
        height: 20px;
         25px;
        padding
    -top: 0px;
        padding
    -right: 2px;
        padding
    -bottom: 0px;
        padding
    -left: 2px;
        font
    -size: 12px;
        text
    -align: center;
        vertical
    -align: middle;
        } 
    .page_curnum {
        background
    -color : #68A6DD;
        border:1px solid #B4C6DA;
        padding
    -right:2px;
        color:#FFFFFF;
        font
    -family: "Courier New", Arial, sans-serif, "新細明體""細明體";
        text
    -align: center;
        vertical
    -align: middle;
        height: 20px;
         25px;
        font
    -size: 12px;
        font
    -weight: bold;
        } 
    .page_num_sel {
        background
    -color : #EDF5F9;
        ine
    -height : normal;
        border:1px solid #B4C6DA;
        font
    -family: "Courier New", Arial, sans-serif, "新細明體""細明體";
        height: 20px;
        padding
    -top: 0px;
        padding
    -right: 2px;
        padding
    -bottom: 0px;
        padding
    -left: 2px;
        font
    -size: 12px;
        text
    -align: center;
        vertical
    -align: middle;
        } 
    </style>

    <table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
      
    <tr valign="top">
        
    <td align="center">
            
    <%if p>0 then%>
              
    <div class="page_link">
                
    <%if allpage<>1 then%>
              
    <%if p>1 then%>
              
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=1" title="第一頁"><font face="Webdings">9</font></a></span>
                
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p-1%>" title="上一頁"><font face="Webdings">7</font></a></span>
          
    <%end if%>            
          
    <%if p<allpage then%>
                
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p+1%>" title="下一頁"><font face="Webdings">8</font></a></span>
          
                
    <span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=allpage%>" title="最後一頁"><font face="Webdings">:</font></a></span>
                
    <%end if%>跳第<select name="p" class="page_num_sel" onChange="MM_jumpMenu(this,0)">
            
    <%for i=1 to allpage%>
            
    <option value="<%=i%>"<%if i=then response.write " selected"%>><%=i%></option>
            
    <%next%>
          
    </select>
                
    <%end if%>
                頁碼:
    <font color="red"><%=p%></font>/<font color="blue"><%=allpage%></font>&nbsp;記錄數:<font color="red"><%=this_pagesize%></font>/<font color="blue"><%=RCount%></font>
                
    </div>
          
    <%end if%></td>
      
    </tr>
    </table>


     

    申明

    非源创博文中的内容均收集自网上,若有侵权之处,请及时联络,我会在第一时间内删除.再次说声抱歉!!!

    博文欢迎转载,但请给出原文连接。

  • 相关阅读:
    Swift中枚举的总结以及使用
    CapsLock Enhancement via AutoHotKey
    计算思维
    计算几何-凸包算法 Python实现与Matlab动画演示
    CapsLock魔改大法——变废为宝实现高效编辑
    Python调用Matlab2014b引擎
    VC++如何利用Matlab2014b的图形引擎进行绘图
    Window中C++进行精确计时的方法
    十四。算法小知识点
    十三。宫水三叶公众号总结
  • 原文地址:https://www.cnblogs.com/Athrun/p/867557.html
Copyright © 2011-2022 走看看