function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } }}function positionMessage(){ if(!document.getElementById || !document.getElementById("message")) return false; var elem = document.getElementById("message"); elem.style.position = "absolute"; elem.style.left = "50px"; elem.style.top = "100px"; movement = setTimeout("moveMessage()",10000);}function moveMessage(){ if(!document.getElementById || !document.getElementById("message")) return false; var elem = document.getElementById("message"); elem.style.left = "200px";}addLoadEvent(positionMessage);addLoadEvent(moveMessage);
添加回答
举报
0/150
提交
取消