Javascript 如何从另一个div中的iframe更改div
我有两个divJavascript 如何从另一个div中的iframe更改div,javascript,html,iframe,Javascript,Html,Iframe,我有两个div <div id="leftdiv"><!--#exec cgi="test.cgi"--></div> <div id="rigthdiv" > <iframe name="rigthdiv" class="contentiframe"allowTransparency="true" frameborder="0" src="iframebg.html"><
<div id="leftdiv"><!--#exec cgi="test.cgi"--></div>
<div id="rigthdiv" >
<iframe name="rigthdiv" class="contentiframe"allowTransparency="true" frameborder="0" src="iframebg.html"><body STYLE="background- color:transparent"></iframe>
</div>
它不能在chrome上运行,但可以在firefox或IE上运行。当您使用javascript时,chrome通常不支持iframe。您可以尝试使用JQuery
function test() {
parent.document.getElementById("leftdiv").innerHTML = 'Processing complete.';
}