아이프레임 內의 DIV 소스를 비활성시킬 수 있을까요???
본문
<script type='text/javascript'>document.write('<iframe width="640" height="460" scrolling="no" frameborder="0" scrolling="no" allowtransparency="true" src="http://cdn.tiv.pw/stream36.html"></iframe>');</script>
위와 같이 스크립트로 아이프레임을 제 웹사이트에 불러왔습니다.
그런데 불러 온 아이프레임 주소 소스내에 활성화 된 특정 DIV 레이어를 비활성시키고 싶은데요? 가능할까요?
아래는 불러 온 아이프레임 내의 소스입니다.
아래 소스 중
| <div class="floater"> | |
| <div class="Advertisement" id="Advertisement1"> | |
| <!-- BEGIN STANDARD TAG - 628 x 80 - : Run-of-site - DO NOT MODIFY --> | |
| <iframe frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="300" height="250" SRC="http://static.surk.tv/ad300f2.html"></iframe> | |
| <!-- END TAG --> | |
| <img class="close" src="http://4372f0f736b94c17980f-72149a3bba3a67bfaa92318a7ed89a98.r76.cf1.rackcdn.com/closey.gif" /> | |
| </div> | |
| <div class="Advertisement" id="Advertisement2"> | |
| <iframe frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="700" height="90" SRC="http://static.surk.tv/ad728f2.html"></iframe> | |
| <img class="close" src="http://4372f0f736b94c17980f-72149a3bba3a67bfaa92318a7ed89a98.r76.cf1.rackcdn.com/closey.gif" /> | |
| </div> | |
| </div> |
요 부분들의 DIV 태그를 비활성시켜 창이 안뜨게 하고 싶습니다.
---------------------- 아 래 -------------------------------------
| <html> | |
| <head> | |
| <title></title> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> | |
| <script type='text/javascript' src='http://4372f0f736b94c17980f-72149a3bba3a67bfaa92318a7ed89a98.r76.cf1.rackcdn.com/swfobject.js'></script> | |
| <script type='text/javascript'> | |
| $(document).ready(function(){ | |
| $(".close").click(function(){ | |
| $(this).parent(".Advertisement").remove(); | |
| $(".drt, .message").hide(); | |
| }); | |
| var seconds = 21; | |
| var cuenta = setInterval(function(){ | |
| seconds--; | |
| if (seconds == 0) { | |
| $(".close").show(); | |
| $('.message').html("."); | |
| clearInterval(cuenta); | |
| } | |
| },10); | |
| }); | |
| </script> | |
| <style> | |
| body { | |
| margin:0; | |
| padding:0; | |
| background:#fff; | |
| position:relative; | |
| } | |
| .close { | |
| width:8px; | |
| height:8px; | |
| position: absolute; | |
| display:none; | |
| } | |
| .floater { | |
| width:640px; | |
| height:480px; | |
| position:absolute; | |
| left:0; | |
| bottom:25px; | |
| } | |
| .drt { | |
| right:0; | |
| bottom:0; | |
| width:650px; | |
| height:30px; | |
| background:#fff; | |
| opacity:0; | |
| filter:alpha(opacity=0); | |
| position:absolute; | |
| } | |
| .Advertisement { | |
| position:absolute; | |
| } | |
| .Advertisement iframe{ | |
| opacity:0.7; | |
| filter:alpha(opacity=70); /* For IE8 and earlier */ | |
| position:absolute; | |
| left:0; | |
| top:0; | |
| background:#fff; | |
| } | |
| .Advertisement .close { | |
| left: 20px; | |
| top: 20px; | |
| } | |
| .Advertisement .close2 { | |
| top:auto; | |
| bottom:10px; | |
| width:8px; | |
| height:8px; | |
| } | |
| #Advertisement1 { | |
| width:300px; | |
| height:250px; | |
| left:50%; | |
| bottom:65px; | |
| margin: -125px 0 0 -150px; | |
| background:#fff; | |
| } | |
| #Advertisement2 { | |
| width:700px; | |
| height:70px; | |
| left: 0; | |
| bottom: -5; | |
| background:#fff; | |
| } | |
| #sportodin { | |
| max-height:600px; | |
| } | |
| .message { | |
| position:absolute; | |
| top:0; | |
| color:#444; | |
| left:0; | |
| font-size:11px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div style="position:relative"> | |
| <div id="playerflash">Flash player not working</div> | |
| <script type="text/javascript"> | |
| var flashvars = { | |
| 'file': 'stream36', | |
| 'streamer': 'rtmp://rtmp.tiv.pw:1935/redirect', | |
| 'autostart': 'true', | |
| 'abouttext': '', | |
| 'aboutlink': '', | |
| 'logo.link': '', | |
| 'skin': '', | |
| 'logo.linktarget': '_blank', | |
| 'logo.hide': 'false', | |
| 'rtmp.fallback': 'false', | |
| 'provider': 'rtmp', | |
| 'logo.position': 'top-left' | |
| }; | |
| var params = { | |
| 'allowfullscreen': 'true', | |
| 'allowscriptaccess': 'always', | |
| 'wmode': 'opaque' | |
| }; | |
| swfobject.embedSWF('http://97ff0e7e610f20512dbe-483e6ce63d68aeb3d05af6c054efb801.r29.cf1.rackcdn.com/atdedead.swf', 'playerflash', '640px', '460px', '9', 'false', | |
| flashvars, params); | |
| </script> | |
| <div class="drt"><!-- unfull --></div> | |
| <div class="floater"> | |
| <div class="Advertisement" id="Advertisement1"> | |
| <!-- BEGIN STANDARD TAG - 628 x 80 - : Run-of-site - DO NOT MODIFY --> | |
| <iframe frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="300" height="250" SRC="http://static.surk.tv/ad300f2.html"></iframe> | |
| <!-- END TAG --> | |
| <img class="close" src="http://4372f0f736b94c17980f-72149a3bba3a67bfaa92318a7ed89a98.r76.cf1.rackcdn.com/closey.gif" /> | |
| </div> | |
| <div class="Advertisement" id="Advertisement2"> | |
| <iframe frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="700" height="90" SRC="http://static.surk.tv/ad728f2.html"></iframe> | |
| <img class="close" src="http://4372f0f736b94c17980f-72149a3bba3a67bfaa92318a7ed89a98.r76.cf1.rackcdn.com/closey.gif" /> | |
| </div> | |
| </div> | |
| </div> | |
| <script type="text/javascript"> | |
| var _gaq = _gaq || []; | |
| _gaq.push(['_setAccount', 'UA-26981618-1']); | |
| _gaq.push(['_trackPageview']); | |
| (function() { | |
| var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
| ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
| var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
| })(); | |
| </script> | |
| </body> | |
| </html> | |
답변 1
iframe으로 삽입된 후에 내용을 소스보기한 것인가요?
iframe은 단순히 삽입기능만 하기 때문에 불러와진 내용을 수정할 수는 없고 불러오기 전 page에서 가공을 해야합니다.
답변을 작성하시기 전에 로그인 해주세요.