代码本地调试可以正确回调alert弹窗显示JSONP中的内容 可是一旦整合在Greasemonkey中就变成函数没有被定义了.这是什么问题?
<script src="http://upcdn.b0.upaiyun.com/libs/jquery/jquery-2.0.3.min.js"></script>
// ==UserScript==
// @name Hello World
// @description 暂无描述
// @require http://upcdn.b0.upaiyun.com/libs/jquery/jquery-2.0.3.min.js
// @include *
// ==/UserScript==
Greasemonkey脚本firebug调试时提示错误如下:
ReferenceError: jQuery203016154597985419905_1435415657339 is not defined
jQuery203016154597985419905_1435415657339({"translation":["酷"],"basic":{"us-phonetic":"kul","phonetic":"kuːl","uk-phonetic":"kuːl","explains":["n. 凉爽;凉爽的空气","adj. 凉爽的;冷静的;出色的","vt. 使\u2026冷却;使\u2026平静下来","vi. 变凉;平息","adv. 冷静地","n. (Cool)人名;(法)科尔;(英)库尔"]},"query":"cool","errorCode":0,"web":[{"value":["酷","凉爽的","冷静"],"key":"Cool"},{"value":["冷爵士乐","冷爵士","酷派爵士"],"key":"Cool jazz"},{"value":["用烘干机低温烘干","打冷风","用烘焙机低温烘焙"],"key":"Tumble Cool"}]});
1
lmaq 2015-06-28 11:00:35 +08:00 via Android
跨域?
|
3
caoyue 2015-06-28 11:07:01 +08:00 1
跨域只能用 GM_xmlHttpRequest
|