javaScript中的浮动菜单设置问题,有经纶的请进........ function fix(){ nome=navigator.appName if(nome=='Netscape'){ stat() } else{ bar.style.top = 0;//直接改成0或者自己定一个高度}} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我需要的效果是随滚动条拉下去,单自始之终显示在页面的顶部.bar.style.top = 0;这句把菜单定死了. 看看下面的是不是你要的效果一定要加<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>无标题文档</title><script>window.onscroll=duilian;function duilian(){ document.getElementById("div2").style.top=(50+document.documentElement.scrollTop)+"px";}</script></head><body><div id="div2" style="width:80px;height:150px;background-color:blue;position:absolute;top:50px;left:0;"> </div><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></body></html> php类似于团购的剩余时间 javascript 获取标签问题 $(document).ready(function(){});问题 js正则"动态"参数的问题 1 2 3在图片上? Firefox下iFrame,window.onresize问题 关于csdn的 选择论坛 按钮的js效果 很急的问题 问一个JSP和XML或者JSP与javascript之间的问题! 当前页面的脚本发生错误语法错误 有奖(100分)征寻js特效下载的网站 JavaScript 函数库
我需要的效果是随滚动条拉下去,
单自始之终显示在页面的顶部.
bar.style.top = 0;这句把菜单定死了.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script>
window.onscroll=duilian;function duilian(){
document.getElementById("div2").style.top=(50+document.documentElement.scrollTop)+"px";
}</script>
</head><body>
<div id="div2" style="width:80px;height:150px;background-color:blue;position:absolute;top:50px;left:0;">
</div>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></body>
</html>