iLTC Home
Bookmark iLTC!

Categories

Perl
  • Perl Tutorials Beginners

  • Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

  • HTML
  • HTML Tutorials

  • Command Line
  • Command Line Tutorials

  • How Tos
  • Other Tips and Tricks



  • $koko =~ s/\./:)/g;
    1716012

    iLoveTheCode.com

    Use onMouseOut in Javascript

    There are a couple of ways to use the onMouseOut in Javascript...

    If you've used onClick or onMouseOver, then you already know how to use the onMouseOut event handler.

    You can write the javascript right into the link tag or you can call a function located elsewhere in your code.

    First, we'll write the code right into the link:

    <a href="#" onMouseOut="alert('Thanks for the onMouse!')">Need an onMouse?</a>

    -After the onMouseOut tag, we enclose our entire javascript code in double quotation marks.
    -We use javascript's built-in alert method to open an alert box. Since we are inside double quotes, we use single quotes around our message.


    Using onMouseOut to call a function is similar and fairly easy:

    function sayHey() {
    alert('Thanks for the onMouse!');
    }

    <a href="#" onMouseOut="sayHey()">Do you need an onMouse?</a>

    -First we created our function sayHey.
    -Instead of writing our code in the onMouseOut tag, we just called our newly created function.



    Free Copy and Paste Javascript Code:

    <script type="text/javascript">
    <!--

    function sayHey() {
    alert('Thanks for the onMouse again!');
    }

    -->
    </script>

    <a href="#" onMouseOut="alert('Thanks for the onMouse!')">On Mouse 1</a>
    <a href="#" onMouseOut="sayHey()">On Mouse 2</a>



    Resources:
    Use OnMouseOver in Javascript
    Use onClick in Javascript
    Create a Function in Javascript
    Call your Function in Javascript
    Opening an Alert Box in Javascript




    Previous Article: Use OnMouseOver in Javascript
    Next Article: Change a Form Field with Javascript






    Search iLTC w/ Google




    Recent Articles

  • HTML Font Code
  • Javascript and CSS - Easy Pop Up Help Balloons
  • Use OnMouseOver in Javascript
  • Use onMouseOut in Javascript
  • Use innerHTML to Change Text on a Page
  • Renaming a File with Perl's RENAME Function
  • PRINT to Browser with document.write Command in Javascript
  • Passing an Argument or Variable to a Javascript
  • Opening an Alert Box in Javascript
  • Opening a REMOTE WINDOW in Javascript
  • OPEN and WRITE a Data File in Perl
  • OPEN and READ a Data File in Perl
  • Mimic Typing from a Textfield in a Textarea with Javascript
  • Javascript Reset Form








  • Perl Programming - Javascript Programming - HTML Code - Mac Unix Command Line - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006-2009 iLoveTheCode.com


    Contact Chris | About this Site


    1715738
    Counter by iLoveTheCode.com


    Last Modified: Tuesday, 10-Feb-2009 04:39:57 EST



    Hosted as well :)
    Home-brewed logo - 1997