jsonp使用

前端之家收集整理的这篇文章主要介绍了jsonp使用前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. $.ajax({
  2. type : "get",async:false,url : "",dataType : "jsonp",//
  3. jsonp: "jsonpCallback",//
  4. success : function(data){
  5. alert("OK");
  6. var t= JSON.parse(data);
  7. $("#showopen").text("Result:"+t);
  8. },error:function(){
  9. console.log('fail');
  10. }
  11. });

猜你在找的Json相关文章