You are currently browsing the archives for 9 January 2010

All your base

  • Posted on January 9, 2010 at 2:01 pm

Click in this box to enjoy your message.

  1. var x = 0;
  2. var message = "How are you gentlemen !!! \n All your base are belong to us. \n You are on the way to destruction. \n You have no chance to survive make your time. \n Ha Ha Ha Ha. \n";
  3. function how_are_you()
  4. {
  5. current_message = document.main_screen.talking.value;
  6. document.main_screen.talking.value = current_message+message.charAt(x);
  7. x = x+1;
  8. setTimeout("how_are_you()",300);
  9. }
<p>Click in this box to enjoy your message.</p>
<form name="main_screen"> <textarea onclick="how_are_you();"
cols="50" rows="6" name="talking"></textarea></form>

Updating a text box on click.

  • Posted on at 1:13 pm

Click in this box to enjoy your message.

  1. function how_are_you2()
  2. {
  3. document.main_screen2.talking2.value = "How are you gentlemen?";
  4. }
<p>Click in this box to enjoy your message.</p>
<form name=main_screen2>
<input name=talking2 onClick="how_are_you2();">
</form>