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

Example Analysis of Local and Global Refresh of ajax

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article shows you ajax partial and overall refresh example analysis, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.

First of all, let me talk about the plan.

$p.load (url,data,function (response,status,xhr))

Then we need to provide at least two parameters to the callback function of the ajax request, url and a jquery object.

In addition, we may have the possibility of overloading the address bar.

Location.href

So, we need to provide one more parameter.

Therefore, we encapsulate three attributes

/ / partial load String elementId = getPara ("elementId"); String loadPage = getPara ("loadPage"); / / address bar jump path String locationUrl = getPara ("locationUrl"); setAttr ("elementId", elementId); setAttr ("loadPage", loadPage); setAttr ("locationUrl", locationUrl)

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