Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the effect of Ajax paging

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article is about how to achieve the effect of Ajax paging. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

First create the foreground page MyAjaxPager.aspx

The copy code is as follows:

.a {} {height:20px; line-height:20px; border-bottom:1px solid # d8dfea; clear:both;}

.b {} {float:left; width:30px;}

.c {} {float:left; width:500px;}

Var xmlHttp

Function getData (pIndex) {

XmlHttp = GetXmlRequest ()

XmlHttp.onreadystatechange = ShowRepeaterData

XmlHttp.open ("GET", "AjaxProcess.aspx?index=" + pIndex, true)

XmlHttp.send (null)

}

Function ShowRepeaterData () {

If (xmlHttp.readyState = = 4 & & xmlHttp.status = = 200) {

Var gridData = xmlHttp.responseText

Var grid = document.getElementById ("grid")

Grid [XSS _ clean] = gridData

}

}

one

two

three

four

five

fifty

five hundred

5000

50000

99999

Serial number

Name

The screen is very simple, it is a row of index addresses, and when you click the link, the data will be bound to the repeater below in the form of ajax.

The main functions are implemented on AjaxProcess.aspx pages that handle Ajax requests

Thank you for reading! This is the end of the article on "how to achieve the effect of Ajax paging". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report