[РАБОТНИЧЕК ]

Crazy Shaking Form Buttons
18.06.2009, 15:10
Бешеные кнопки!
-----------------------------------------------------------------
Пример использования скрипта:
Test the shake button
Get something harder

Free JavaScripts provided
by The JavaScript Source


----------------------------------------------------------------
Код скрипта:

Вставьте следующий код между тегами <BODY></BODY>



<!-- TWO STEPS TO INSTALL CRAZY SHAKING FORM BUTTONS:

  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the last code into the BODY of your HTML document  -->


<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://rabotnichek.my1.ru -->
<!-- Original:  Scriptbreaker (pieterpareit@hotmail.com ) -->
<!-- Web Site:  http://rabotnichek.my1.ru -->
<!-- Begin
pos = 15;
TO = null;
function shake_funct2(object,speed)
{
  obj = eval(object)
  txt = clear_space(obj.value);
  if (pos == 15)
  {
   txt = txt + "   ";
   pos = -15;
  }
  else
  {
   txt = "   " + txt;
   pos = 15;
  } 
  obj.value = txt;
  obj.style.width = parseInt(obj.style.width) + pos;
  obj = object
  sp = speed
  TO = setTimeout("shake_funct2(obj,sp)",speed);
}

function clear_space(text)
{
 while (text.substring(0,1) == " ")
 {
  text = text.substring(1,text.length);
 }
 while(text.substring(text.length-1,text.length) == " ")
 {
  text = text.substring(0,text.length-1);
 }
 return text;
}

function end_shake_funct2(object)
{
  clearTimeout(TO);
  obj = eval(object);
  txt = clear_space(obj.value);
  obj.value = txt;
  //alert(pos);
  if (pos == -15)
  {
   obj.style.width = parseInt(obj.style.width) +15;
  }
  pos = 15
}
//  End -->
</script>

</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

<form name=myform2>
<table border=0>
<tr><td>
Test the shake button
</td>
<td align=center width=160>
<input type=button value = "shake me" style="font-size:10;width:150" onmouseover="shake_funct2(this,100)" onmouseout="end_shake_funct2(this)">
</td></tr>
<tr><td>
Get something harder
</td>
<td  align=center width=160>
<input type=button value = "A bit faster" style="font-size:10;width:150" onmouseover="shake_funct2(this,50)" onmouseout="end_shake_funct2(this)">
</td></tr>
</Table>
</form>

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://rabotnichek.my1.ru">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  2.25 KB -->

Категория: Навигация | Добавил: Администратор | Теги: интересные кнопки, Java script, кнопки
Просмотров: 394 | Загрузок: 0 | Рейтинг: 0.0/0
Всего комментариев: 0
Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]