var delta=0.30; var collection; function floaters() { this.items = []; this.addItem = function(id,x,y,content) { document.write('
'+content+'
'); var newItem = {}; newItem.object = document.getElementById(id); newItem.x = x; newItem.y = y; this.items[this.items.length] = newItem; } this.play = function() { collection = this.items; setInterval('play()',10); } } function play() { if(document.documentElement.clientWidth < 850) { for(var i=0;i0?1:-1)*Math.ceil(Math.abs(dx)); followObj.style.left=followObj.offsetLeft+dx + "px"; } if(followObj.offsetTop!=(document.documentElement.scrollTop+followObj_y)) { var dy=(document.documentElement.scrollTop+followObj_y-followObj.offsetTop)*delta; dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy)); followObj.style.top=followObj.offsetTop+dy + "px"; } followObj.style.display = ''; } } var leftup,leftdown,rightup,rightdown; today = new Date(); tYear = today.getFullYear(); tMonth = today.getMonth()+1; tToday = today.getDate(); thistime = tYear*10000+tMonth*100+tToday //当前时间转化的规格数字 //右上 rightuptimestar = 20040813 //规定撤除的时间转化的规格数字 rightuptimeend = 20200818 if (thistime >= rightuptimestar && thistime <= rightuptimeend) { rightup = "
微信
"; rightup += "
[关闭]
"; } else { rightup = ""; } var theFloaters = new floaters(); theFloaters.addItem('followDiv3','document.documentElement.clientWidth-110',15,''+rightup+''); theFloaters.play();