Three special webpage effects that are commonly used but not known to most people

Source: Internet
Author: User
Tags servervariables
Hide table borders

You can use the frame parameter to control the table, but note that it only controls the border of the table without affecting the cell:
1. Only show the upper border <Table Frame = abve>
2. Only show the lower border <talbe frame = below>
3. only show the left and right borders <talbe frame = vsides>
4. Only the top and bottom borders are displayed. <talbe frame = hsides>
5. show only the left border <talbe frame = LHS>
6. show only the right border <talbe frame = RHS>
7. Do not display any borders <talbe frame = void>

Keep the page element at the bottom of the page

<HTML>
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<Title> untitled document </title>
</Head>
<Body>
<Br>
<Div style = "position: absolute; Height: 10pt; top: expression (document. body. clientHeight-this.style.pixelHeight + document. body. scrolltop); Font: 9pt; "> does JS need to locate an object at the bottom of the page and scroll with the page? This is a complete example! </Div>
</Body>
</Html>
However, this code cannot select any document type (doctype)
ASP paging Functions
<%
Sub pagecontrol (icount, pagecount, page, table_style, font_style)
'Generate the next page of the previous page.
Dim query, A, X, temp
Action = "http: //" & request. servervariables ("http_host") & request. servervariables ("script_name ")

Query = Split (request. servervariables ("QUERY_STRING "),"&")
For each X in Query
A = Split (x, "= ")
If strcomp (A (0), "page", vbtextcompare) <> 0 then
Temp = temp & A (0) & "=" & A (1 )&"&"
End if
Next

Response. Write ("<Div" & table_style & ">" & vbcrlf)
Response. Write ("<form method = get onsubmit =" "document. Location = '" & Action &"? "& Temp &" page = '+ this. Page. value; return false; ""> "& vbcrlf)
Response. Write ("" & vbcrlf)
Response. Write (font_style & vbcrlf)

If page <= 1 then
Response. Write ("Homepage" & vbcrlf)
Response. Write ("Previous Page" & vbcrlf)
Else
Response. Write ("<a href =" & Action &"? "& Temp &" page = 1> homepage </a> "& vbcrlf)
Response. Write ("<a href =" & Action &"? "& Temp &" page = "& (page-1) &"> previous page </a> "& vbcrlf)
End if

If page> = pagecount then
Response. Write ("next page" & vbcrlf)
Response. Write ("last page" & vbcrlf)
Else
Response. Write ("<a href =" & Action &"? "& Temp &" page = "& (page + 1) &"> next page </a> "& vbcrlf)
Response. Write ("<a href =" & Action &"? "& Temp &" page = "& pagecount &"> last page </a> "& vbcrlf)
End if

Response. Write ("Page:" & page & "/" & pagecount & "page" & vbcrlf)
Response. Write ("Total" & icount & "customers" & vbcrlf)
Response. write ("go to" & "<input type = 'text' name = page size = 1 maxlength = 5 value =" & page & "class = 'inputtext'/> "& "page" & vbcrlf & "<input type = 'submit 'value = 'Go' class = 'inputbutton'/> ")
Response. Write ("" & vbcrlf)
Response. Write ("</form>" & vbcrlf)
Response. Write ("</div>" & vbcrlf)
End sub

%>
'Application
<Table>
<% If Rs. recordcount> 0 then %>
Rs. pagesize = 20' number of records per page
Icount = Rs. recordcount 'total number of records
Ipagesize = Rs. pagesize
Maxpage = Rs. pagecount
Page = request ("page ")
If not isnumeric (PAGE) or page = "" then
Page = 1
Else
Page = CINT (page)
End if

If page <1 then
Page = 1
Elseif page> maxpage then
Page = maxpage
End if

Rs. absolutepage = page

If page = maxpage then
X = icount-(maxpage-1) * ipagesize
Else
X = ipagesize
End if

For I = 1 to X %>
<Tr bgcolor = "# ffffff">
<TD width = "44"> <Div align = "center"> <% = RS ("ID") %> </div> </TD>
<TD width = "309"> <a href = "Submit. asp? Action = edit & id = <% = RS ("ID") %> "> <% = RS (" AAA ") %> </a> </TD>
<TD width = "257"> <% = RS ("BBB") %> </TD>
<TD width = "73"> <Div align = "center"> <% = RS ("CCC") %> m </div> </TD>
<TD width = "139"> <Div align = "center"> <% = RS ("DDD") %> </div> </TD>
</Tr>
<% Rs. movenext
Next %>
<Tr bgcolor = "# ffffff">
<TD colspan = "5"> <Div align = "center">
<%
Call pagecontrol (icount, maxpage, page, "border = 0 align = center", "<p align = center> ")
%>
</Div> </TD>
</Tr>
<% Rs. Close
End if %>
</Table>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.