Mootools 1-4 Ajax

Source: Internet
Author: User
Tags mootools

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 !"

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.