|
|
#16 |
|
Администратор
Регистрация: 12.09.2007
Адрес: Н.Н. Автозавод.
Пол: M
Провайдер: Ростелеком
Сообщений: 10,445
Поблагодарил: 400
Поблагодарили 25,199 раз в 7,583 сообщениях
Открыли хайд
:
0 в этом сообщении 7,767 Всего |
блин, а точно.
админ! кнопку прикрутить надо. собственно, вот сам скрипт: Код:
<script type="text/javascript">
<!--
function getObj(objID)
{
if (document.getElementById) {return document.getElementById(objID);}
else if (document.all) {return document.all[objID];}
else if (document.layers) {return document.layers[objID];}
}
cobj=getObj("button1");
var x1=0, y1=0;
function moveIt(){
x=Math.floor(Math.random()*401);
y=Math.floor(Math.random()*301);
while (Math.abs(x1-x)<=70) {x=Math.floor(Math.random()*401);}
while (Math.abs(y1-y)<=50) {y=Math.floor(Math.random()*301);}
x1=x;
y1=y;
cobj.style.left = x+"px";
cobj.style.top = y+"px";
}
//-->
</script>
Код:
<button id="button1" style="background-color:#f2f2f2; border-radius:5px;height:50px;width:150px;position:relative;z-index:10" onmousedown="moveIt()" onmouseover="moveIt()" onfocus="moveIt();this.blur()">Вступить в клуб АА</button> |
|
|
|