有時後一個版面會嵌入好幾個iframe
後面應該用css來分會比較好啦
暫時先來簡單的…
引用:http://www.cnblogs.com/micheng11/archive/2009/03/31/1425883.html
但是IE可行,放在Firefox(FF)就…轉個不停...
引用:http://www.cnblogs.com/lovko/archive/2009/01/04/1368013.html
結束了,最後做個小小的整理
<script type="text/javascript">
function stateChangeIE(_frame,loadid) {
var b = document.getElementById(loadid.toString());
_frame.style.display = "none";
b.style.display = "block";
_frame.onreadystatechange = function() {
if (this.readyState == "complete") {
b.style.display = "none";
_frame.style.display = "block";
}
}
}
function stateChangeFirefox(_frame,loadid) {
var loader = document.getElementById(loadid.toString());
loader.style.display = "none";
_frame.style.display = "block";
}
</script>
<div id="load" ><img src="http://sc.cnwebshow.com/upimg/allimg/070707/01294420.gif" /></div>
<iframe id="demoframe" onreadystatechange=stateChangeIE(this,'load') onload=stateChangeFirefox(this,'load') src="輸入連結網頁" ></iframe>
好文:
http://www.seomydream.com/seo-jiqiao/iframe.htm,如何優化iframe框架的技巧
http://www.cnblogs.com/tianguook/archive/2010/06/24/1764235.html,Frame、iFrame、noframe的區別和使用
沒有留言:
張貼留言