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

What is the ajax class AJAXRequest2007 in javascript

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

Share

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

Editor to share with you what the ajax class AJAXRequest2007 in javascript is, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

AJAXRequest is a lightweight AJAX application development framework, which is compatible with Firefox, IE, Opera and Safari. It can easily perform some operations that are often used in AJAX, so as to simplify the development steps and reduce the amount of repetitive code writing.

If you find a problem during use, or if you have any good comments and suggestions, you can email me at vipxjw [at] 163 [dot] com.

Release of AJAXRequest v0.7.12 2007-12-31

1. Add stopupdate method

two。 Modify the update method to return the value of update request ID, which is used for AJAXRequest to stop updating.

3. Modify the form validation property onsubmit of the postf method to onvalidate

4. Modify the parameter of postf method to post (form, [callback]), and remove action and method parameters.

5. Fixed the problem that the default value of post method parameter content is not global content attribute

6. Fixed the problem that the "+" received by postf method is blank.

7. Fixed the error of onrequeststart and onrequestend names in the construction parameters of AJAXRequest class

8. Fixed a problem with sending requests synchronously

For more details, see the AJAXRequest developer's manual: http://ajax.xujiwei.cn/

For more usage examples, see AJAXRequest Development example: http://www.xujiwei.cn/demo/ajaxrequest/

Update description

1. Change the return value of the update method to update request ID

In this version, the update method no longer returns a timer ID, that is, you can no longer use the return value of the update method as a parameter to use the clearInterval method to stop the update, but instead use the stopupdate method inside AJAXRequest to stop the update.

In addition, not only unlimited updates will return update ID, but limited updates will also return update ID, that is, if you only update a specified number of times, you can also use the stopupdate method to stop updates before the specified number of updates is reached.

Example (JavaScript):

Program code: [copy code to clipboard]

The copy code is as follows:

/ / code sample by xujiwei

/ / site: http://www.xujiwei.cn/

Var ajax = new AJAXRequest ()

Var u

/ / start an unlimited number of times to update the object updateObj from test.asp at an interval of 1 second

Function start () {

U = ajax.update ("updateObj", "test.asp", 1000)

}

/ / stop updating

Function stop () {

Ajax.stopupdate (u)

}

two。 Modify the form validation property onsubmit of the postf method to onvalidate

If you use onsubmit for form validation, it may conflict with some applications, so change the form validation property to onvalidate, for example (HTML):

The copy code is as follows:

/ / code sample by xujiwei

/ / site: http://www.xujiwei.cn/

3. Modify the parameter of postf method to post (form, [callback])

This modification limits the parameters of the postf method to form objects and callback functions, that is, action and method must be specified in the form tag, for example (HTML):

Program code:

The copy code is as follows:

/ / code sample by xujiwei

/ / site: http://www.xujiwei.cn/

/ / the action and method attributes of the form tag must be specified

The above is all the content of the article "what is the ajax class AJAXRequest2007 in javascript". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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