Firefox 取编辑框内容 一个iframe嵌入了另一个页面的iframe编辑框,怎么取第二个iframe编辑框的内容?要支持Ff的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 iframe.contentWindow.document.body.innerHTML 。 var Iframe ; if(document.frames) { Iframe = document.frames('IframeName'); Iframe.document.contentEditable='true'; } else { Iframe =document.getElementById('IframeID').contentWindow; } Iframe.document.body.innerHTML Iframe.document.getElementById().... var iframe = document.getElementById('IframeID').contentWindow;var value = iframe.document.getElementById('文本框ID').value 获取对象,然后获取其元素document.getElementById('IframeID').contentWindow.document.getElementById('ID').value 这个编辑框是iframe的,也可以用value啊! 你那个编辑框 是放在iframe里面的吧?var value = iframe.document.getElementById('文本框ID').value这句不就是在拿文本框的id吗 然后拿vlaue 没有文本框啊!是iframe的编辑框,这个编辑框是套在另一个iframe里面的 test.html------<HTML><HEAD><TITLE>Popup Example</TITLE><SCRIPT>function ButtonClick(){ var oIframe = document.getElementById("iframe1"); alert(oIframe.contentWindow.document.getElementById("inner_input").value);}</SCRIPT></HEAD><BODY>outer:<input type=button onclick="ButtonClick();" value="click me"><iframe id="iframe1" src="inner.htm"></iframe></BODY></HTML>inner.htm-------------inner:<input type=text id="inner_input" value="okay" > 我这个没有文本框的,是iframe编辑框 document.getElementById('IframeID').innerHTML 上面写错了,这个行不?document.getElementById('IframeID').contentWindow.document.getElementById('ID').innerHTML 实在不好意思,上面的好像都不行,这下可以了:document.getElementById( "iframe1 ").contentWindow.document.getElementById( "iframe2 ").contentWindow.document.body.innerText; mouseover 问题 新手求助,请问如何改变? JS高手帮忙啊!!!!! 表格中固定行列 javascript取得session问题 我是用window.open() 来打开一个页面 我现在如何实现不用openDialog() 来实现重复点击只弹出一个页面 急!如何用脚本设置浏览器的安全级别?急! serializable 是什么来的 高分求解,javascript的问题!!! 求救!!给多多分 JQuery Validation插件在无Form的情况下如何验证input? Jquery因为版本不同而导致ajax方法不一样
if(document.frames)
{
Iframe = document.frames('IframeName');
Iframe.document.contentEditable='true';
}
else
{
Iframe =document.getElementById('IframeID').contentWindow;
} Iframe.document.body.innerHTML
Iframe.document.getElementById()
....
var value = iframe.document.getElementById('文本框ID').value
你那个编辑框 是放在iframe里面的吧?
var value = iframe.document.getElementById('文本框ID').value
这句不就是在拿文本框的id吗 然后拿vlaue
test.html
------<HTML>
<HEAD>
<TITLE>Popup Example</TITLE><SCRIPT>function ButtonClick()
{
var oIframe = document.getElementById("iframe1");
alert(oIframe.contentWindow.document.getElementById("inner_input").value);
}
</SCRIPT>
</HEAD><BODY>
outer:<input type=button onclick="ButtonClick();" value="click me">
<iframe id="iframe1" src="inner.htm"></iframe></BODY>
</HTML>inner.htm
-------------
inner:
<input type=text id="inner_input" value="okay" >
document.getElementById('IframeID').contentWindow.document.getElementById('ID').innerHTML
document.getElementById( "iframe1 ").contentWindow.document.getElementById( "iframe2 ").contentWindow.document.body.innerText;