如何將Json Rpc數據傳遞給指定的回調函數,就像Json一樣。 您可以通過在url中指定回調參數來獲取響應數據。Json Rpc回調函數
例如:
var url = "http://...sample/..?alt=new&callback=dispUser";
var script = document.createElement('script');
script.src = url;
document.body.appendChild(script);
那麼結果將是這樣的
dispUser({ 「ID」: 「」 });
但在Json Rpc我不能,有沒有辦法通過聲明回調來獲取Json Rpc的響應數據。如果沒有,我將如何在客戶端顯示這些數據。因爲我只能使用Json Rpc或SOAP XML獲取這些api服務,這就是文檔所告訴的。
你在想_jsonp_而不是_json-rpc_嗎? – 2012-04-03 09:10:44