解决方案
你没表示清楚 下面的按钮是在某个iframe
里吗?
1、你的click
错了
2、可以给iframe
个id
方便区分
topobj.onclick = function(){ //获取到id为iframe的frame的上下文 document.getElementById("iframe").contentWindow.document.body.style.background = ""}
你没表示清楚 下面的按钮是在某个iframe
里吗?
1、你的click
错了
2、可以给iframe
个id
方便区分
topobj.onclick = function(){ //获取到id为iframe的frame的上下文 document.getElementById("iframe").contentWindow.document.body.style.background = ""}