js 访问 iframe 内部 的元素 设置成 透明

 

代码

self.frames['iit'].document.all.iframe_pic.style.background = 'url(img/handOff.gif) no-repeat';

 

页面引用的iframe

<iframe id='iit' scrolling="no" src='pic.html'
    style=" position: absolute; visibility: inherit; top: 0px; left: 0px; height: 20px; width: 20px; z-index: -1; filter ='progid: DXImageTransform.Microsoft.Alpha (             style =             0, opacity =             0 ) ';">
   </iframe>

 

 

iframe 'pic.html' 内部的元素

<div id='iframe_pic' style="background:url(img/changePostion.gif) no-repeat;position:absolute; visibility:inherit; top:0px; left:0px;  height:30px;width:30px;  z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';"></div>

 

 

 

 

 

<iframe id='iit' scrolling="no" src='mousefollow.html' frameborder='no' allowTransparency='true'
    style="position: absolute; visibility: inherit; top: 0px; left: 0px; height: 20px; width: 20px; z-index: -1; filter ='progid: DXImageTransform.Microsoft.Alpha (             style =             0, opacity =             0 ) ';">
   </iframe>

 

 

 

<body style="background-color:transparent">
<div id='iframe_pic' style="background:url(img/changePostion.gif) no-repeat;position:absolute; visibility:inherit; top:0px; left:0px;  height:30px;width:30px;  z-index:-1; filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';"></div>
    </body>

你可能感兴趣的:(html,Microsoft)