- var $ = document.getElementById;
- var $$ = document.documentElement;
- function fixDiv(id){
- $(id).style.top = ($$.scrollTop + $$.clientHeight - $(id).clientHeight - 20) + "px";
- setTimeout("fixDiv('newYear')",2);
- }
- fixDiv('newYear');
转载于:https://www.cnblogs.com/hacker84/archive/2008/09/23/1296863.html