此代码已在 iframe
中收到,以便在主窗口中运行名为 uploadingData(x,y)
的函数,但如您所见,存在问题.我不知道哪里出了问题!!
最佳答案
IFrame 中的页面与主页面(父
页面)是分开的。因此,要从 IFrame 中调用主页上的代码,您必须从 IFrame 的父级获取函数,正如 Diodeus 指出的那样。看起来像这样:
window.parent.uploadingData(x,y);
关于javascript - 问题是在 iframe 中收到用于运行函数的代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10554709/