How to resolve Ajax in compatibility mode background call execution two times result invariant problem

Source: Internet
Author: User
Tags execution json

Mainly because the cache is not clear, if you want to manually remove too rookie, through the network query, found that just change the URL address parameters on the line, the best way is to take time as a parameter. The following examples refer to you.

Submit.ashx?m_time=new Date (). GetTime ()

To add, if not, you must use Type:post, which is critical

' Type: ' Post ', '
    
   $.ajax ({     
            ///To be POST method      
            type: ' Post ',     
            //Method's page and method name      
            URL: ' Demo.aspx/sayhello ',     
            contentType: "Application/json; Charset=utf-8 ",     
            dataType:" JSON ",     
            success:function (data) {     
                ///returned to get Content      
                alert (DATA.D) with DATA.D;     
            } ,     
            error:function (err) {     
                alert (err);     
            }     
        });

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/ajax/

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.