?? cls_db.asp
字號:
<%
dim conn,rst
function openDB
Set conn = Server.CreateObject("ADODB.Connection")
rst="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("TP.mdb")
conn.Open rst
end function
function closeDB
conn.close
set conn=nothing
end function
REM 分頁顯示
function page(allpages,viewpage,pageURL,pp)
if int(allpages)=0 then
page="<font color=red >[1]</font>"
exit function
end if
dim pn,pi,page_num,ppp,pl,pr:pi=1:ppp=pp\2
if pp mod 2 = 0 then ppp=ppp-1
pl=viewpage-ppp:pr=pl+pp-1
if pl<1 then
pr=pr-pl+1:pl=1
if pr>allpages then pr=allpages
end if
if pr>int(allpages) then
pl=pl+allpages-pr:pr=allpages
if pl<1 then pl=1
end if
if pl>1 then
response.write page&" <a href='"& pageURL &"' title='第一頁'>[|<]</a> <a href='"& pageURL &"?pageno="&pl-1&"' clases=706501 title='上一頁'>[<]</a> "
end if
for pi=pl to pr
if cint(viewpage)=cint(pi) then
response.write page&" <font color=red>[" & pi & "]</font> "
else
response.write page&" <a href='"& pageURL &"?pageno="& pi &"' title='第 " & pi & " 頁'>[" & pi & "]</a> "
end if
next
if pr<allpages then
page=page&" <a href='"& pageURL &"?pageno="&pi&"' title='后一頁'>[>]</a> <a href='"& pageURL &"?pageno="& allpages &"' title='最后一頁'>[>|]</a> "
end if
end function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -