페이지 코드
5664 단어 페이지 코드
:
<%'' :Pages.asp%>
<%'' ADO adovbs.inc, "\Program Files\Common Files\System\ADO" %>
<!--#Include File="adovbs.inc"-->
<%''* , Oracle8.05
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Provider=msdaora.1;Data Source=YourSrcName;User ID=YourUserID;Password=YourPassword;"
Set rs=Server.CreateObject("ADODB.Recordset") '' Recordset
rs.CursorLocation=adUseClient ''
''* ,
rs.PageSize=10
''*
StrSQL="Select ID, , , from Order By ID"
rs.Open StrSQL,conn,adOpenStatic,adLockReadOnly,adCmdText
%>
<HTML>
<HEAD>
<title> </title>
<script language=javascript>
// "[ ]" :
function PageFirst()
{
document.MyForm.CurrentPage.selectedIndex=0;
document.MyForm.CurrentPage.onchange();
}
// "[ ]" :
function PagePrior()
{
document.MyForm.CurrentPage.selectedIndex--;
document.MyForm.CurrentPage.onchange();
}
// "[ ]" :
function PageNext()
{
document.MyForm.CurrentPage.selectedIndex++;
document.MyForm.CurrentPage.onchange();
}
// "[ ]" :
function PageLast()
{
document.MyForm.CurrentPage.selectedIndex=document.MyForm.CurrentPage.length-1;
document.MyForm.CurrentPage.onchange();
}
// " ? " :
function PageCurrent()
{ //Pages.asp
document.MyForm.action='Pages.asp?Page='+(document.MyForm.CurrentPage.selectedIndex+1)
document.MyForm.submit();
}
</Script>
</HEAD>
<BODY bgcolor="#ffffcc" link="#008000" vlink="#008000" alink="#FF0000"">
<%IF rs.Eof THEN
Response.Write("<font size=2 color=#000080>[ !]</font>")
ELSE
''
If Request("CurrentPage")="" Then
rs.AbsolutePage=1
Else
rs.AbsolutePage=CLng(Request("CurrentPage"))
End If
'' MyForm, Get
Response.Write("<form method=Get name=MyForm>")
Response.Write("<p align=center><font size=2 color=#008000>")
''
if rs.PageCount=1 then
Response.Write("[ ] [ ] [ ] [ ] ")
else
if rs.AbsolutePage=1 then
Response.Write("[ ] [ ] ")
Response.Write("[<a href=javascript:PageNext()> </a>] ")
Response.Write("[<a href=javascript:PageLast()> </a>] ")
else
if rs.AbsolutePage=rs.PageCount then
Response.Write("[<a href=javascript:PageFirst()> </a>] ")
Response.Write("[<a href=javascript:PagePrior()> </a>] ")
Response.Write("[ ] [ ] ")
else
Response.Write("[<a href=javascript:PageFirst()> </a>] ")
Response.Write("[<a href=javascript:PagePrior()> </a>] ")
Response.Write("[<a href=javascript:PageNext()> </a>] ")
Response.Write("[<a href=javascript:PageLast()> </a>] ")
end if
end if
end if
'' ,
Response.Write(" <select size=1 name=CurrentPage onchange=PageCurrent()>")
For i=1 to rs.PageCount
if rs.AbsolutePage=i then
Response.Write("<option selected>"&i&"</option>") ''
else
Response.Write("<option>"&i&"</option>")
end if
Next
Response.Write("</select> / "&rs.PageCount&" "&rs.RecordCount&" </font><p>")
Response.Write("</form>")
'' ,
Response.Write("<table align=center cellspacing=1 cellpadding=1 border=1")
Response.Write(" bordercolor=#99CCFF bordercolordark=#b0e0e6 bordercolorlight=#000066>")
Response.Write("<tr bgcolor=#ccccff bordercolor=#000066>")
Set Columns=rs.Fields
''
For i=0 to Columns.Count-1
Response.Write("<td align=center width=200 height=13>")
Response.Write("<font size=2><b>"&Columns(i).name&"</b></font></td>")
Next
Response.Write("</tr>")
''
For i=1 to rs.PageSize
Response.Write("<tr bgcolor=#99ccff bordercolor=#000066>")
For j=0 to Columns.Count-1
Response.Write("<td><font size=2>"&Columns(j)&"</font></td>")
Next
Response.Write("</tr>")
rs.movenext
if rs.EOF then exit for
Next
Response.Write("</table>")
END IF
%>
</BODY>
</HTML>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
페이지 코드텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.