完全去除页面滚动条的方法

| |
[不指定 April 8, 2008 09:50 | by jed ]
今天做站的时候客户要求实现网站全屏,使用JavaScript:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="javascript">
  <!--
function fullscreen(){
window.open("/index.htm","","scrollbars=0,toolbar=0,location=0,fullscreen=1,directories=0,status=0,menubar=0,resizable=0");
}
  // -->
</script>
</head>
<body>
<h3 align="center"><a href="j avascript:fullscreen()">打开</a></h3>
</body>
</html>



可是,即使scrollbars值为0,在全屏的时候仍然会出现滚动条,后来发现,要完全取消滚动条,还需要在CSS里面加上:


overflow:hidden;



有网友说可以在Body里面加上scroll=no实现,例如


<body scroll=no></body>



本人实验也通过,证明是好用的!
Tags: ,
代码编程 | 评论(1) | 引用(0) | 阅读(700)
游客
September 27, 2008 15:51
shuai
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]