정적 페이지 함수

2971 단어 function
'============================================  
' :HtmlPage 
'    :  
'    :PageName------ ( qlwz_2.html qlwz) 
'    :intPageNow------  
'    :intPageCount------  
'============================================ 
  
Function HtmlPage(PageName,intPageNow,intPageCount)  
Dim isEnd,intStartPage,intEndPage  
isEnd = False  
    intStartPage=(intPageNow\10)*10+1  
    IF (intPageNow mod 10=0) then intStartPage=(intPageNow\10)*10-9  
    intEndPage=intStartPage+9  
    IF intPageNow>10 then  
        HtmlPage = HtmlPage&"<a href="""&PageName&".html"" title="" "" style=""text-decoration:none"">?</a>"  
        HtmlPage = HtmlPage&"<a href="""&PageName&"_"&intPageNow-1&".html"" page=""1"" title="" "" style=""text-decoration:none;"">?</a>"  
        HtmlPage = HtmlPage&" <a href="""&PageName&"_"&intStartPage-1&".html"" title="" "" style=""text-decoration:none""><</a>"  
    End IF  
    For intStartPage = intStartPage To intEndPage  
        If intStartPage = intPageNow Then  
            HtmlPage = HtmlPage&"<strong>"& intStartPage &"</strong>"  
        ElseIf intStartPage = 1 Then  
            HtmlPage = HtmlPage&"<a href="""&PageName&".html"">"& intStartPage &"</a>"  
        Else  
            HtmlPage = HtmlPage&"<a href="""&PageName&"_"&intStartPage&".html"">"& intStartPage &"</a>"  
        End If  
        If intStartPage >= intPageCount Then  
            isEnd = True  
            Exit For  
        End IF  
    Next  
    If Not isEnd Then  
        HtmlPage = HtmlPage&"<a href="""&PageName&"_"&intPageNow+1&".html"" title="" "" page=""3"" style=""text-decoration:none"">?</a>"  
        HtmlPage = HtmlPage&"<a href="""&PageName&"_"&intStartPage&".html"" title="" ""></a>"  
        HtmlPage = HtmlPage&"<a href="""&PageName&"_"&intPageCount&".html"" title="" "" style=""text-decoration:none"">?</a>"  
    End If  
Response.write HtmlPage  
End Function  

좋은 웹페이지 즐겨찾기