c#, jquery cross domain

แนะนำ สอบถาม ภาษา C สำหรับผู้เริ่มต้น ภาษา Java ภาษา Python

Moderators: mindphp, ผู้ดูแลกระดาน

User avatar
jataz2
PHP Super Member
PHP Super Member
Posts: 255
Joined: 22/02/2011 11:48 am

c#, jquery cross domain

Post by jataz2 »

Code: Select all

            jQuery.support.cors = true;
            var url = 'http://10.0.0.1:81/click/application';
            var resp;
            $.ajax
            ({
                url: url,
                crossDomain: true,
                type: 'GET',
                async: false,
                headers: { "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "GET, PUT, POST, DELETE, OPTIONS" },
                cache: false,
                success: function (response) {
                    alert('called success');
                }, error: function (response) {
                }
                }).done(function (data) {
                }).fail(function (a, b, c, d) {
            });
  • Similar Topics
    Replies
    Views
    Last post

Return to “Programming - C/C++ & java & Python”

Who is online

Users browsing this forum: No registered users and 11 guests