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