We haven't used mootools for a long time. Previously we used 1.1, and now we have upgraded it to 1.4. Download the new version and find that the Ajax implementation methods have changed. Make a demo and leave a mark.
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head runat = "server">
<Title> ajaxtest1 -- requesttext </title>
<SCRIPT src = "http://www.cnblogs.com/mootools/mootools-core-120.12.16.4.1-full-nocompat.js" type = "text/JavaScript"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
Window. addevent ('domainready', function (){
$ ('Btnsent'). addevent ('click', function (){
VaR url = 'ajaxtest. aspx? V = '+ escape ($ ('txtvalue'). value );
VaR myrequest = new request ({method: 'post', URL: URL, oncomplete: showmsg });
Myrequest. Send ('v = '+ escape ($ ('txtvalue'). Value ));
});
Function showmsg (requesttext ){
$ ('Divrebackmsg '). innerhtml = requesttext;
}
});
</SCRIPT>
</Head>
<Body>
<Input id = "txtvalue" type = "text"/>
<Input id = "btnsent" type = "button" value = "send"/>
<Div id = "divrebackmsg"> </div>
</Body>
</Html>
Output "Hello, mootools!" In page_load in the background !"