3个回答
2013-04-04
展开全部
网上给你找到的:
完整的代码<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Design Corp" content="www.mysuc.com" />
<meta name="Designer" content="hayden" />
<meta name="Designer mail" content="QQ:3996992" />
<meta name="robots" content="hayden" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
</head>
<body style="margin:0;padding:0;">
<div id="wawa" style="background:#ff0000;width:1800px;height:1800px;color:#fff;" ><A HREF="#" onclick="setwindow();">点击这里测试</A>fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</div><SCRIPT LANGUAGE="JavaScript">
<!--
var temp_h1 = document.body.clientHeight;
var temp_h2 = document.documentElement.clientHeight;
var isXhtml = (temp_h2<=temp_h1&&temp_h2!=0)?true:false;
var htmlbody = isXhtml?document.documentElement:document.body;
var newdivs = false;
function setwindow(){
if (newdivs){
newdivs = false;
htmlbody.style.overflow = "auto";
}else{
newdivs = true;
htmlbody.style.overflow = "hidden";
}
}
//-->
</SCRIPT>
</body>
</html>
完整的代码<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Design Corp" content="www.mysuc.com" />
<meta name="Designer" content="hayden" />
<meta name="Designer mail" content="QQ:3996992" />
<meta name="robots" content="hayden" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
</head>
<body style="margin:0;padding:0;">
<div id="wawa" style="background:#ff0000;width:1800px;height:1800px;color:#fff;" ><A HREF="#" onclick="setwindow();">点击这里测试</A>fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</div><SCRIPT LANGUAGE="JavaScript">
<!--
var temp_h1 = document.body.clientHeight;
var temp_h2 = document.documentElement.clientHeight;
var isXhtml = (temp_h2<=temp_h1&&temp_h2!=0)?true:false;
var htmlbody = isXhtml?document.documentElement:document.body;
var newdivs = false;
function setwindow(){
if (newdivs){
newdivs = false;
htmlbody.style.overflow = "auto";
}else{
newdivs = true;
htmlbody.style.overflow = "hidden";
}
}
//-->
</SCRIPT>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
overflow:hidden 不就行了吗?
你具体需求是什么啊
你具体需求是什么啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的意思是有悬浮框但是不滚动的意思吗
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询