php的借用其餘網站的頁面覆蓋Logo的技巧,javascript
<body> <div id="red_f"></div> <div class="layout" style="width: 320px"> <div class="houserent"> <div id="logo58"> <img src="__IMG__/logo58.jpg" alt="" /> </div> <iframe id="page58" src="{$urlsy}" frameborder="0"> </iframe> </div> </div> <script type="text/javascript" src="__JS__/jquery-1.7.2.js"></script> <script type="text/javascript"> $(function(){ window.onload = function (){ var hh = $(window).height(); $('.houserent').find('iframe').css({ 'width': 320 + 'px', 'height': hh +'px' }); } }); </script> </body>
能夠看到咱們是利用一個LOGO將原網站的LOGO進行覆蓋,原本有一種想法是經過頁面的js控制頁面仍是不行。由於別人網站是在一個分幀內,根據瀏覽器的顯示協議,一個分幀至關於一個頁面在外面的js是沒法控制的,因此js是沒法進入php
<iframe id="page58" src="{$urlsy}" frameborder="0"> </iframe>裏面去控制的,就是說滾動條都是別人的網站,因此沒法檢測。