<input type=button value=next onclick="parent.topfrmname.window.location.href='next.htm'">
<input type=button value=forward onclick="parent.topfrmname.window.location.href='forward.htm'">

解决方案 »

  1.   

    给你个asp写的分页..用client script实现的哦.
    <!--#INCLUDE FILE="../PUBLIC/CONNECT_DB.ASP"-->
    <%
    RecordCount=0
    strSQL="SELECT c2j_record_id FROM company_lib JOIN c2j ON company_lib.company_record_ID=c2j.company_id" & condition
    rs.Open strSQL,cn,1,1
    if not rs.EOF then
    JobIdList=rs.GetRows()
    RecordCount=UBound(JobIdList,2)+1
    end if
    rs.Close
    %>
    <!--#INCLUDE FILE="../PUBLIC/DISCONNECT_DB.ASP"-->
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>深圳IT人才网</title>
    <link href=/public/style.css rel=stylesheet type=text/css>
    <%
    if RecordCount>0 then
    PageSize=1
    SectionSize=1
    PageCount=RecordCount\PageSize
    if(RecordCount mod PageSize)<>0 then PageCount=PageCount+1
    SectionCount=PageCount\SectionSize
    if(PageCount mod SectionSize)<>0 then SectionCount=SectionCount+1
    gs_URL="PSEEKJ_RESULT_LIST.ASP"
    gs_RequestTarget="SearchResult"
    %>
    <script language=javascript src="../PUBLIC/COMMON.JS"></script>
    <script language=javascript>
    var gs_URL="<%=gs_URL%>";
    var gs_RequestTarget="<%=gs_RequestTarget%>";
    var RecordCount=<%=RecordCount%>;
    var PageSize=<%=PageSize%>;
    var PageCount=<%=PageCount%>;
    var CurrentPage=1;
    var SectionSize=<%=SectionSize%>;
    var SectionCount=<%=SectionCount%>;
    var CurrentSection=1;
    var PageArray=new Array(<%=UBound(JobIdList,2)\PageSize%>);
    <%
    for i=LBound(JobIdList,2) to UBound(JobIdList,2)\PageSize
    %>
    PageArray[<%=i%>]=new Array(<%=PageSize%>)
    <%
    for j=0 to PageSize-1
    if (i*PageSize+j)<=UBound(JobIdList,2) then
    %>
    PageArray[<%=i%>][<%=j%>]=<%=JobIdList(0,i*PageSize+j)%>;
    <%
    else
    %>
    PageArray[<%=i%>][<%=j%>]=0;
    <%
    end if
    next
    next
    %>
    window.onload=InitPage;
    </script>
    <%
    end if
    %>
    </head>
    <body leftmargin="0" topmargin="0">
    <!--#include virtual="/public/top.asp" -->
    <table width=760 height=25  border=0 align=center cellpadding=0 cellspacing=0 class=border01>
    <tr> 
    <td align=left background=/images/table_bg_a.gif bgcolor=29b2d6>
    <div class=menu>::::<font color=#01495b>搜索结果 ::::</font></div>
    </td>
    </tr>
    </table>
    <table width=760 height=1 align=center cellpadding=0 cellspacing=0 bgcolor=007d9c><tr><td></td></tr></table>
    <table width=760  align=center cellpadding=0 cellspacing=0 bordercolorlight=#000000 bordercolordark=#ffffff class=border02>
    <tr bgcolor=d6eff7><td height=5 colspan=3 valign=top></td></tr>
    <tr> 
    <td width=5 valign=top bgcolor=d6eff7></td>
    <td height=35 align=center valign=middle bgcolor=d6eff7>
    <fieldset style=WIDTH:100%;HEIGHT:35px marginwidth=2 topmargin=2 leftmargin=2 align=left id=NavigateTop onclick="CopyHTML()">
    <legend style=color:#ff6600>『搜索结果统计』</legend>
    <font color=00596b>共<%=RecordCount%>条求职信息 &nbsp; &nbsp;
    <%
    if RecordCount>0 then
    %>
    当前页:<font color=ff6600 id=_CurrentPage></font> &nbsp; &nbsp;
    <font style=cursor:hand color=ff6600 face=webdings title=第一页 onclick="GoFirstPage()">9</font>
    <font style=cursor:hand color=ff6600 face=webdings title=前一页 onclick="GoPrevPage();">7</font>
    [<font style=cursor:hand onclick="GoPrevSection()">←</font>
    <%
    for i=1 to SectionSize
    'if 
    %>
    <input size=3 readonly class=inputb id="Page<%=i%>" value="<%=i%>" color=#990000 
    style="cursor:hand;font-weight:bold" onclick="CurrentPage=this.value;RequestPage(this.value)">
    <%
    next
    %>
    <font style=cursor:hand onclick="GoNextSection()">→</font>]
    <font style=cursor:hand color=ff6600 face=webdings title=下一页 onclick="GoNextPage();">8</font>
    <font style=cursor:hand color=ff6600 face=webdings title="尾 页" onclick="GoLastPage();">:</font>
    <font color=00596b>到第
    <input onkeypress="NumberInput()" class=inputc value="1"><button 
    style=width:25;height:17 class=inputa onclick="GoPage()"><font color=000000>Go</font></button>
    页</font>
    <%
    end if
    %>
    </font>
    </fieldset>
    </td>
    <td width=5 valign=top bgcolor=d6eff7></td>
    </tr>
    <tr bgcolor=d6eff7 onmouseover=this.bgColor='#e1f5fb' onmouseout=this.bgColor='d6eff7'><td height=5 colspan=3 valign=top></td></tr>
    </table>
    <CENTER><IFRAME src="<%=gs_URL%>" width=760 height=100 FRAMEBORDER=0 name="<%=gs_RequestTarget%>"></IFRAME></CENTER>
    <table width=760 align=center cellpadding=0 cellspacing=0 bordercolorlight=#000000 bordercolordark=#ffffff class=border02>
    <tr bgcolor=d6eff7><td height=5 colspan=3 valign=top></td></tr>
    <tr> 
    <td width=5 valign=top bgcolor=d6eff7></td>
    <td height=35 align=center valign=middle bgcolor=d6eff7>
    <fieldset style=WIDTH:100%;HEIGHT:35px marginwidth=2 topmargin=2 leftmargin=2 align=left id=NavigateBottom onclick="CopyHTML()"></fieldset>
    </td>
    <td width=5 valign=top bgcolor=d6eff7></td>
    </tr>
    <tr bgcolor=d6eff7 onmouseover=this.bgColor='#e1f5fb' onmouseout=this.bgColor='d6eff7'><td height=5 colspan=3 valign=top></td></tr>
    </table>
    <!--#include virtual="/public/bottom.asp" -->
    </body>
    </html>
      

  2.   

    PSEEKJ_RESULT_LIST.ASP<!--#INCLUDE FILE="../PUBLIC/CONNECT_DB.ASP"-->
    <%
    if Request.Form("IDs")<>"" then
    condition=" WHERE c2j_record_id IN(" & Request.Form("IDs") & ")"
    else
    Response.End
    end if
    strSQL="SELECT company_name,c2j_JobName,c2j_WorkPlace,c2j_work_experience,c2j_education,c2j_salary,c2j_record_UpdateDate"
    strSQL=strSQL & " FROM company_lib JOIN c2j ON company_lib.company_record_ID=c2j.company_id" & condition
    rs.Open strSQL,cn,1,1
    if not rs.EOF then
    JobList=rs.GetRows()
    end if
    rs.Close
    %>
    <!--#INCLUDE FILE="../PUBLIC/DISCONNECT_DB.ASP"-->
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>深圳IT人才网</title>
    <link href="/public/style.css" rel="stylesheet" type="text/css">
    </head>
    <body leftmargin=0 topmargin=0 scroll=no>
    <table width=760 border=0 align=center cellpadding=0 cellspacing=1 bgcolor=eaf8fd class=border02>
    <tr bgcolor=d1e9f1 height=20>
    <td width=150 align=center bgcolor=d1e9f1><B><font color=00556b>公司名称</font></B></td>
    <td width=150 align=center bgcolor=d1e9f1><B><font color=00556b>职位名称</font></B></td>
    <td width=70 align=center bgcolor=d1e9f1><B><font color=00556b>工作地区</font></B></td>
    <td width=70 align=center bgcolor=d1e9f1><B><font color=00556b>工作经验</font></B></td>
    <td width=70 align=center bgcolor=d1e9f1><B><font color=00556b>要求学历</font></B></td>
    <td width=70 align=center><B><font color=00556b>最低月薪</font></B></td>
    <td width=70 align=center><B><font color=00556b>更新日期</font></B></td>
    </tr>
    <%
    if IsArray(JobList) then
    for i=LBound(JobList,2) to UBound(JobList,2)
    %>
    <tr bgcolor=d6eff7 onmouseover=this.bgColor='#e1f5fb' onmouseout=this.bgColor='d6eff7' height=20>
    <td align=center><font color=00596b><%=Server.HTMLEncode(JobList(0,i))%></font></td>
    <td><font color=00596b><%=Server.HTMLEncode(JobList(1,i))%></font></td>
    <td align=center><font color=00596b><%=Server.HTMLEncode(JobList(2,i))%></font></td>
    <td align=center><font color=00596b><%=Server.HTMLEncode(JobList(3,i))%></font></td>
    <td align=center><font color=00596b><%=Server.HTMLEncode(JobList(4,i))%></font></td>
    <td align=center><font color=00596b><%=Server.HTMLEncode(JobList(5,i))%></font></td>
    <td align=center><font color=00596b><%=Server.HTMLEncode(JobList(6,i))%></font></td>
    </tr>
    <%
    next
    end if
    %>
    </table>
    <script language="javascript">
    function test()
    {
    alert(parent.document.body.innerHTML)
    }
    parent.document.all.tags("iframe")[window.name].height=document.body.scrollHeight;
    </script>
    </body>
    </html>
      

  3.   

    common.js(客户端分页的核心代码哦)function NumberInput()
    {
    if(event.keyCode<48||event.keyCode>57){event.returnValue=false;}
    }
    function PhoneInput()
    {
    if(event.keyCode>=48&&event.keyCode<=57||event.keyCode==45)
    {event.returnValue=true;}
    else
    {event.returnValue=false;}
    }
    function PageValid(PageNo)
    {
    if(PageNo<=PageCount&&PageNo>0)
    {
    //alert(PageNo)
    return PageNo
    }
    else
    {
    return "'---'"
    }
    }
    function SetPage()
    {
    for(i=1;i<NavigateTop.all.tags("input").length;i++)
    {
    NavigateTop.all.tags("input")[i-1].removeExpression("value");
    NavigateTop.all.tags("input")[i-1].setExpression("value",eval("PageValid(" + ((CurrentSection-1)*SectionSize+i) + ")"))
    if((CurrentSection-1)*SectionSize+i==CurrentPage)
    {
    NavigateTop.all.tags("input")[i-1].style.color="#ff0000"
    NavigateTop.all.tags("input")[i-1].style.cursor="#default"
    }
    else
    {
    NavigateTop.all.tags("input")[i-1].style.color="#000000"
    NavigateTop.all.tags("input")[i-1].style.cursor="hand"
    }
    }
    if(document.readyState=="complete")
    {
    NavigateBottom.removeExpression('innerHTML'); NavigateBottom.setExpression('innerHTML','NavigateTop.innerHTML')
    }
    }
    function CopyHTML()
    {
    NavigateBottom.removeExpression('innerHTML'); 
    NavigateBottom.setExpression('innerHTML','NavigateTop.innerHTML')
    }
    function RequestPage(No)
    {
    if(isNaN(No)){alert("已到尾页,没有更多的数据!!");return}
    var index=new Number(No);
    index--;
    tmpForm=document.createElement("FORM");
    tmpForm.action=gs_URL;
    tmpForm.method="post";
    tmpForm.target=gs_RequestTarget;
    for(i=0;i<PageArray[index].length;i++)
    {
    IDs=document.createElement("INPUT");
    IDs.name="IDs";
    IDs.type="hidden";
    IDs.value=PageArray[index][i];
    tmpForm.appendChild(IDs);
    }
    NavigateTop.all("_CurrentPage").removeExpression("innerHTML");
    NavigateTop.all("_CurrentPage").setExpression("innerHTML","CurrentPage");
    document.body.appendChild(tmpForm)
    tmpForm.submit();
    document.body.removeChild(tmpForm);
    SetPage();}
    function InitPage()
    {
    if(document.readyState=="complete")
    {
    NavigateBottom.click();
    RequestPage(1);
    SetPage()
    }}
    function GoPage()
    {
    if(event.srcElement.previousSibling.value!='')
    {
    if(!isNaN(event.srcElement.previousSibling.value))
    {
    var thisPageNo=new Number(event.srcElement.previousSibling.value);
    if(thisPageNo<=PageCount&&thisPageNo>0)
    {
    CurrentPage=thisPageNo;
    CurrentSection=Math.ceil(CurrentPage/SectionSize);
    event.srcElement.previousSibling.removeExpression("value");
    event.srcElement.previousSibling.setExpression("value","CurrentPage");
    RequestPage(CurrentPage);
    }
    else
    {
    alert("没有这么多页!!")
    CurrentPage=1;
    CurrentSection=1;
    event.srcElement.previousSibling.removeExpression("value");
    event.srcElement.previousSibling.setExpression("value","CurrentPage");
    RequestPage(CurrentPage);
    }
    SetPage();
    }
    }
    }
    function GoPrevPage()
    {
    if(CurrentPage>1)
    {
    if((CurrentPage-1) % SectionSize==0)
    {
    GoPrevSection()
    }
    else
    {
    CurrentPage--;
    RequestPage(CurrentPage)
    }
    }
    }
    function GoPrevSection()
    {
    if(CurrentSection>1)
    {
    CurrentSection--;
    CurrentPage=CurrentSection*SectionSize;
    RequestPage(CurrentPage);
    }
    }
    function GoNextPage()
    {
    if(CurrentPage<PageCount)
    {
    if(CurrentPage % SectionSize==0)
    {
    GoNextSection()
    }
    else
    {
    CurrentPage++;
    RequestPage(CurrentPage)
    }
    }
    }
    function GoNextSection()
    {
    if(CurrentSection<SectionCount)
    {
    CurrentSection++;
    CurrentPage=(CurrentSection-1)*SectionSize+1;
    RequestPage(CurrentPage);
    }
    }
    function GoFirstPage()
    {
    CurrentPage=1;
    CurrentSection=1;
    RequestPage(CurrentPage);
    }
    function GoLastPage()
    {
    CurrentPage=PageCount;
    CurrentSection=SectionCount;
    RequestPage(CurrentPage);
    }