Prototype Ajax Peng's simple research

Source: Internet
Author: User
Now I am playing with Ajax, but it is still quite good to say this thing. All languages can be used together, and all ASP PHP aspx jsp can be used together .. However, browsers have different attitudes towards them. Peng originally wrote an Ajax file written in Javascript, but only Ie can use it (download Peng's specialized Ajax code from IE ), later, let's look at a fully compatible browser .. Thick .. Let's take a look at some of the Code. JavaScript code: 1 <SCRIPT src = "prototype. js"> </SCRIPT>
2 <SCRIPT type = "text/JavaScript">
3
4
5 function useajax (objectid, URL, pars)
6 {
7
8 $ (objectid). innerhtml = "processing ";
9var url = URL;
10var pars = pars;
11
12var myajax = new Ajax. Updater ({success: objectid}, URL, {method: 'post', parameters: pars, insertion: showresponse });
13
14
15}
16 function showresponse (OB, St)
17 {
18 // put returned XML in the textarea
19 $ (OB). innerhtml = Unescape (ST );
20}
21 </SCRIPT>
22

Call code: 1 <Div id = "tp176"> vote
2 <input name = "toupiao" type = "checkbox" onclick = "useajax('tp176', 'vote.txt ', 'toupiao = 000000');" value = "176"/>
3 </div>

Download prototype Ajax compatible with all browsers:

Download prototypeajax peng Summary

Related Article

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.