亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

js如何設(shè)置在iframe框架中指定div不顯示

 更新時(shí)間:2013年12月04日 17:48:18   作者:  
在iframe框架中指定div不顯示,有多種實(shí)現(xiàn)方法,接下來(lái)與大家分享下使用js的具體實(shí)現(xiàn),感興趣的朋友可以參考下
復(fù)制代碼 代碼如下:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>測(cè)試</title>
<script language="javascript" type="text/javascript">

function getStyle() {

if (window.top == window.self) {

document.getElementById("top").style.display = 'block';

} else {

document.getElementById("top").style.display = 'none';


}

}
</script>

</head>
<body onload="getStyle();">
<form id="form1" runat="server">
<div id="top">
在框架中不顯示,正常訪問(wèn)顯示
</div>
</form>
</body>
</html>

當(dāng)當(dāng)前頁(yè)面正常訪問(wèn)時(shí)顯示div top

當(dāng)當(dāng)前頁(yè)面在iframe中時(shí)頁(yè)面不顯示 div top

相關(guān)文章

最新評(píng)論