0

jQuery を使用して JSONP 呼び出しを取得しc:\index.html、定義します。

var url = 'http://localhost:8080/test/jsonServlet'
if (mockTest)
    url = 'file:bla.json';
jQuery.ajax({
  type: "POST",
  url: url,
  dataType: 'jsonp',
  error: function(a,b,c) {
    console.debug("ERR", b, c);
  }
});

は次のc:\bla.jsonようになります。

var f = this.jQuery.expando;
console.debug("BLA", f);
f = this[f].handle;
console.debug("TYPE", typeof f);
f({'decoration':'Hello World!'}); // call the callback!

次の 3 つのメッセージがあります。

BLA jQuery1705534191443584859
TYPE function 
ERR parsererror jQuery1705534191443584859_1372951198352 was not called
4

1 に答える 1