โค้ด: เลือกทั้งหมด
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) {
});