假设我有一个js页面(上传到某个服务器,使用此地址:myaddress / service.js),并带有以下代码:
nsBob = {
a: function(someParam) {...do something here and return result},
b: function() {...do something here and return result},
c: function() {...do something here and return result}
};
现在让我们说我在某个地方有一个应用程序,在不同的域中,我想使用nsBob的一个功能。例如nsBob.a(某事)。
如何在不同的域中为这个特定函数调用这个简单的ajax调用来获取此函数的结果数据? 有或没有传递参数。 如果你能以某种方式向我展示一个完整的工作例子,我真的很感激。
非常感谢你!