Combination of ASP left-hand and right-hand -- Implementation of pseudo Paging

Source: Internet
Author: User

VB and JS are the left and right hands of ASP.

Both hands are indispensable

 

 

This is an unexpected idea after I call VB through Js.

It should be because it does not need to read data every time a page is changed like a page.

Data is read on the page.

So I call it pseudo-paging.

 

 

First run the Code:

 <Div class = "te_jia_ji_piao"> <br/> <Div class = "title_1"> <br/> <SPAN class = "more"> <a href = "#" mce_href = "#"> More >></A> </span> <span> special fares </span> <br/> </div> <br/> <% <br/> dim rs_1, totalcount, totalpage, maxperpage, currentpage <br/> call opendb <br/> currentpage = 1 <br/> SQL = "select * From ji_piao where istj = true order by ID DESC" <br/> set rs_1 = server. createobject ("ADODB. recordset ") <br/> rs_1.open SQL, Conn, 1, 1 <br/> If rs_1.eof and rs_1.bof then <br/> response. write "no data" <br/> else <br/> rs_1.pagesize = 11 <br/> rs_1.absolutepage = currentpage <br/> totalcount = rs_1.recordcount 'total number of records <br/> totalpage = rs_1.pagecount <br/> maxperpage = rs_1.pagesize <br/> end if <br/> for j = 1 tors_1.pagecount 'loop tab box. Total number of pages after pagination <br/>%> <br/> <Div class = "Air" style = "display: none" mce_style = "display: none "> <br/> <% <br/> for I = 1 to rs_1.pagesize <br/> If rs_1.eof then <br/> exit for <br/> end if <br />%> <br/> <Div class = "ji_piao"> <br/> <span style = "color: #000; width: 90px; font-weight: normal; "> <% = rs_1 (" data ") %> </span> <br/> <span style = "width: 120px;"> <% = rs_1 ("leave ") %>-<% = rs_1 ("Arrival") %> </span> <br/> <span >¥ <% = rs_1 ("Price") %> </span> <br/> <span> <% = rs_1 ("discount ") %> </span> <br/> <a href = "tickets. asp? Id = <% = rs_1 ("mce_href =" tickets. asp? Id = & lt; % = rs_1 ("ID ") %> "> ticket booking </a> <br/> </div> <br/> <% <br/> rs_1.movenext <br/> next <br/> %> <br/> </div> <br/> <% <br/> next <br/> rs_1.close <br/> set rs_1 = nothing <br/> close conn <br/ >%> </P> <p> <Div style = "font-size: 12px; float: Right; margin-Right: 20px; "mce_style =" font-size: 12px; float: Right; margin-Right: 20px; "> <br/> <% <br/> for I = 1 to totalpage 'page footer generation" [1], [2], [3]... "<br/> %> <br/> <a class =" airfoo T "href =" javascript: void (0) "mce_href =" javascript: void (0) "onclick =" Air (<% = I %> ); "Style =" display: inline-block "> [<% = I %>] </a> <br/> <% <br/> next <br/> %> <br/> </ div> <br/> </div> <br/> <MCE: script Type = "text/JavaScript"> <! -- <Br/> $ ('. air: first'mirror.css ('display', 'block'); <br/> $ ('. airfoot: first'0000.css ('color', '# f00'); <br/> // --> </MCE: SCRIPT> <br/> // select <br/> function air (AA) {<br/> $ (". air "). each (function (I) {<br/> if (I = (aa-1) <br/> evaluate (this(.css ('display', 'block ') <br/> else <br/> Publish (this).css ('display', 'None') <br/>}); <br/> $ (". airfoot "). each (function (I) {<br/> if (I = (aa-1) <br/> evaluate (this(.css ('color', '# f00 ') <br/> else <br/> emerge (this).css ('color', '# 000') <br/>}); <br/>}

 

The reason is false paging.

In fact, all the data is read when the page is loaded.

Generate a tab box for each page

Display the information of each page in the tab box

To put it bluntly, it is a process of dynamically generating the tab box.

 

As for the selection of the double box, jquary is used for implementation.

 

 

The preceding method is not used to display a large amount of information.

 

:

1:

 

 

 

2:

 

 

The first blog. No. Sorry.

Please add my qq815762641 ~

 

 

 

 

 

 

 

 

 

 

 

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.