You are currently browsing the Javascript category

Alakazam hide and seek

  • Posted on January 11, 2010 at 6:30 am


Show

<script src="http://write-site.net/jquery-1.3.2.js" type="text/javascript"></script>
<a id="switch" onClick="$('img[id=alakazam]').show('slow');">Show</a>
<img src="http://farm3.static.flickr.com/2628/4192131856_27bdb92d89.jpg" id="alakazam" onClick="$('img[id=alakazam]').hide('slow');"/>

Hello JQuery

  • Posted on January 10, 2010 at 8:12 am



Click here for Hello!

// This code syntax requires that JQuery be imported.
 $(document).ready(function() {
   $("a[name=hello]").click(function() {
     alert("Hello world!");
   });
 });

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>