js 调用 iframe 中的 函数问题 先看newFrame.window.editor这个方法,存在吗?再看,newFrame.window.editor.html这个方法存在吗?这个错误提示,应该只能是你的方法,没有调用正确。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 newFrame.window.document.editor.html('newsContent');这样试试 。你要调用子页面的元素 ,你的获取到子页面的document对象才可以。调用方法获取window对象就可以了 editor.html();这个绝对是有的newFrame.window.document.editor.html('newsContent');也不行感觉就运行到newFrame.window.document.editor就不运行了。 editor 显然是一个在线编辑器newFrame.document.getElementById('editor').html('newsContent'); $(newFrame.window.document).find("#editor").html("ddddddd");editor 是id 。 要引jquery包。 $(newFrame.window.document.editor).html('newsContent');editor 应该是name ,觉得应该也没问题。不加$是element对象 ,没有jquery的 html()方法,所以报错。 问一个比较简单的问题,为什么我写的onclick在页面载入完成前会自动触发? 高手指点 关于window.opener的疑问! 类似excel合并单元格的js 求一个TEXT控件填入值,点一个按钮,把值传入到SELECT控件中的JS代码啊。 如何把几张不确定的图片显示在一个网页中 javascript做树型结构的问题, 关于全局变量... 我是新手,有一个问题想请教一下. 那里有js控制REAL插件的语言参考? 求大神 大神,我这个变量如何实现? highchart数据绑定
调用方法获取window对象就可以了
也不行
感觉就运行到newFrame.window.document.editor就不运行了。
newFrame.document.getElementById('editor').html('newsContent');