简体   繁体   中英

Uncaught TypeError: jsonpCallback is not a function

H iam implementing jsonp ajax function to execute but i get Uncaught TypeError: jsonpCallback is not a function .what seems to be problem

APP_URL = "http://127.0.0.1:8000/",
 $.ajax({
       url:"http://127.0.0.1:8000/d..er/lang-api/?callback=jsonpCallback", 
       method: "GET", 
       data:{drop_lang:drop_language},
       dataType: "jsonp", 
      jsonp: !1, 
      jsonpCallback: "jsonpCallback"
}), 
 window.jsonpCallback = function (e) {
        e.fn.surveywidget = function (a) {

您需要确保在将数据提交到的站点上定义了一个名为jsonpCallback的函数:“ http://127.0.0.1:8000/d..er/lang-api

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM