首选,我写了 <div id='div2009_2010' style="position: absolute; bottom: 0; right: 5px; width: 240px; z-index:6000;
height: 165px;">
<span style="float: right; width: 100%; text-align: right; position: absolute;"><a
href="javascript:void(0);" style="color: Yellow; font-weight: bold;" onclick='javascript:parentElement.parentElement.style.display="none";'>
关闭 X</a></span><a href="/2009-2010/2009-2010meeting.html" target="_blank">
<img src='2009-2010/rb2.jpg' alt='' /></a>
</div>
window.onscroll = movepeixun;
var y = 0;
function movepeixun() {
var scrollHeight = document.body.scrollHeight;
var div = document.getElementById("div2009_2010");
if (div) {
var winH = document.documentElement.clientHeight ?document.documentElement.clientHeight: document.body.clientHeight;
var scrollTop = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
y = (scrollTop + winH - div.offsetHeight);
if (y >= scrollHeight) {
return;
} div.style.posTop = y;
y = parseInt(div.style.posTop);
}
}
window.onresize = window.onscroll;
window.scroll();这两个是可以在页面滚动并且保持位置不变的。。
在ie里是可以的。。
但在傲游里。。就拖拉垂直滚动条 一段时间。。那么 这些 固定的 div 都 会自然的消息。。
请问这是什么回事?只要解决了。。多多分都给
height: 165px;">
<span style="float: right; width: 100%; text-align: right; position: absolute;"><a
href="javascript:void(0);" style="color: Yellow; font-weight: bold;" onclick='javascript:parentElement.parentElement.style.display="none";'>
关闭 X</a></span><a href="/2009-2010/2009-2010meeting.html" target="_blank">
<img src='2009-2010/rb2.jpg' alt='' /></a>
</div>
window.onscroll = movepeixun;
var y = 0;
function movepeixun() {
var scrollHeight = document.body.scrollHeight;
var div = document.getElementById("div2009_2010");
if (div) {
var winH = document.documentElement.clientHeight ?document.documentElement.clientHeight: document.body.clientHeight;
var scrollTop = document.body.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop;
y = (scrollTop + winH - div.offsetHeight);
if (y >= scrollHeight) {
return;
} div.style.posTop = y;
y = parseInt(div.style.posTop);
}
}
window.onresize = window.onscroll;
window.scroll();这两个是可以在页面滚动并且保持位置不变的。。
在ie里是可以的。。
但在傲游里。。就拖拉垂直滚动条 一段时间。。那么 这些 固定的 div 都 会自然的消息。。
请问这是什么回事?只要解决了。。多多分都给
解决方案 »
- 使用ajax给后台传递数组,后台拆分问题!急!!!!!
- 我想知道这个js输出了什么结果,怎么测试?
- UI DIALOG 的close()方法和destroy()方法的区别
- Javascript显示隐藏DIV,如何实现鼠标在DIV上移开才隐藏?
- 用html和Ajax来开发网站,应该几个软件????
- 二行JS,帮忙看看,先谢谢了,是关于如何把后台代码绑定到前台的?
- 求一验证“价格”的正则表达式。
- 页面上点击一个图片,传入参数为"1"时候就打开相应的一个文件的链接,如果不为一就alert(“文件不存在”),最好用vbscript
- 如和传递变量到PHP中
- 求教关于PDF 在线阅读的控制
- 怎么把元素恢复回来啊?
- 抽奖程序取得返回值
主要是div里面如果有a元素。那么就会有 ie捉迷藏 bug。。
我是这样认为的