»
EnglishFrenchVietnamese

Print - Blinking Textbox Effect - JavaScriptBank.com

Full version: jsB@nk » Form » Blinking Textbox Effect
URL: https://www.javascriptbank.com/blinking-textbox-effect.html

Blinking Textbox Effect © JavaScriptBank.comWhen executed, this JavaScript will place the cursor in a specified textbox, causing its background to blink for 6 seconds. This will highlight the textbox on the Web page in order to draw attention to it.

Full version: jsB@nk » Form » Blinking Textbox Effect
URL: https://www.javascriptbank.com/blinking-textbox-effect.html



JavaScript
<script type="text/javascript">// Created by: Ben Kanaev :: http://www.webhostreview.bizfunction blinkExecute(target,color){  document.getElementById(target).style.backgroundColor = color;}function blinkBlink (target){  color1 = "#feff6f"; // blinking color  color2 = "#ffffff"; // background color  setTimeout('blinkExecute("'+target+'","'+color1+'")',0);  setTimeout('blinkExecute("'+target+'","'+color2+'")',500);  setTimeout('blinkExecute("'+target+'","'+color1+'")',1000);  setTimeout('blinkExecute("'+target+'","'+color2+'")',1500);               setTimeout('blinkExecute("'+target+'","'+color1+'")',2000);  setTimeout('blinkExecute("'+target+'","'+color2+'")',2500);       setTimeout('blinkExecute("'+target+'","'+color1+'")',3000);  setTimeout('blinkExecute("'+target+'","'+color2+'")',3500);       setTimeout('blinkExecute("'+target+'","'+color1+'")',4000);  setTimeout('blinkExecute("'+target+'","'+color2+'")',4500);               document.getElementById(target).focus();}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<body onload="blinkBlink('name')"><table width="300" align="center">  <tr>    <td width="100"><b>Name:</b></td>    <td width="200"><input id="name" type="text"></td>  </tr><tr>    <td width="100"><b>Address:</b></td>    <td width="200"><input id="address" type="text"></td>  </tr><tr>    <td width="100"><b>Phone Number:</b></td>    <td width="200"><input id="phone" type="text"></td>  </tr><tr>    <td colspan="2" align="center">    <input type="button" value="Submit" onClick="alert('Not submitted ... just testing.');blinkBlink('name')">    </td>  </tr></table></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->