I have seen blog examples and tried cross-domain successfully.
I used nodejs to simulate it and changed it to a local address. Why can’t I get the content in zanNum?
Nodejs opens the configuration without any problem.
Result: alert(‘fail’)
$(function(){
$.ajax({
type: "get",
async: false,
url: "http://192.168.191.1:3000/zanNum",
dataType: "jsonp",
jsonp: "callback",
jsonpCallback:"response",
success: function(response){
alert(response);
},
error: function(){
alert('fail');
}
});
});
The methods of using get and post with jsonp are given in , please refer to