div随着滚动条移动

<script>
window.onscroll=function(){
       DivID.style.top  = document.body.scrollTop + document.body.offsetHeight - DivID.offsetHeight - 15;
       DivID.style.left = document.body.scrollLeft + document.body.offsetWidth - DivID.offsetWidth - 25;
}
</script>

你可能感兴趣的:(div)