我已经被困在这个问题上好几个小时了。
我在上有一个a.html,其中包含一个iframe,其中包含上的b.html的源。a.html有一些JS代码可以postMessage到iframe。
postMessage的代码很简单:
iframe_window.postMessage('message', iframe_element.src)
但是这样一来,Chrome会抛出一个错误:
Unable to post message to http://subdomain.example.com. Recipient has origin null.
我也尝试过:
iframe_wi
我是js的新手,并且只学习了大约一周,所以请善待我。下面的脚本更改了iframe的src,以便在单击带有.thumb类的链接时匹配相同iframe的自定义数据属性。
这工作得很好,但是它当前更改了所有iframe的所有类的iframe src,父div类是.gallery。我只想用与变量‘.gallery’相同的索引值来改变点击的iframe src。
//When an link with a class of .thumb is clicked
$(document).on('click', '.thumb', function () {
//v
我有一个gwt模块,我正在尝试加载到我的主页。这是一个非常标准的例程:
public class TimeFvHelper implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {
ChargeToTreePresenter presenter = new ChargeToTreePresenterImpl(new ChargeToTree());
RootPanel.get("divPicker"