iLTC Home
Bookmark iLTC!
iLTC Google Boards

Google Groups
Receive The Code in Email!



Categories

Perl
  • Perl Tutorials Beginners

    Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

    HTML
  • HTML Tutorials



  • Pass the Javascript, please...
    123,743

    iLoveTheCode.com
    Javascript > Javascript Tutorials How To Easy > Use onMouseOut in Javascript

    Use onMouseOut in Javascript



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

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

    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="javascript:alert('Thanks for the onMouse!')">Need an onMouse?</a>

    -After the onMouseOut tag, we enclose our entire javascript code in double quotation marks.
    -We start with the javascript: to tell the browser we have javascript code coming up.
    -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="javascript: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="javascript:alert('Thanks for the onMouse!')">On Mouse 1</a>
    <a href="#" onMouseOut="javascript: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


    Click HERE to comment or discuss at iLoveTheCode GOOGLE Group
    Previous Article: Use OnMouseOver in Javascript
    Next Article: Change a Form Field with Javascript





    Bulletproof Web DesignBulletproof Web Design

    Dan Cederholm

    New $23.99

    Learning Web DesignLearning Web Design

    Jennifer Niederst ...

    New $26.99

    CSSCSS

    Eric Meyer

    New $29.69

    DojoDojo

    Matthew A. Russell...

    New $26.39

    Information Architecture...Information Architecture for the Wor...

    Louis Rosenfeld, P...

    New $26.39

    JavaScriptJavaScript

    David Flanagan

    New $31.49

    Creating Web SitesCreating Web Sites

    Matthew MacDonald

    New $19.77

    CSS MasteryCSS Mastery

    Andy Budd, Simon C...

    New $23.85

    HTML & XHTMLHTML & XHTML

    Chuck Musciano, Bi...

    New $29.99


    Of Interest:
  • And, Or, Equal, Not Equal, Greater Than, Less Than in Perl
  • Add to the Beginning of an Array with Unshift in Perl
  • Exit a Loop with Last
  • Create or Put Items into an Array in Perl
  • Use onLoad in Body Tag with Javascript
  • Javascript Array - Create an Array in Javascript
  • Javascript Reverse - Use Reverse on Items in an Array in Javascript
  • Javascript Unshift - Use Unshift to Put Items on the Front of an Array in Javascript
  • HTML Status
  • Make Strikethrough Text Using HTML
  • Make Text Bold Using HTML
  • HTML Forms

  • More Articles:
  • Delete a File Using unlink in Perl
  • Create or Put Items into an Array in Perl
  • Write a FOR LOOP in Perl
  • Redirect to a Different URL in Perl
  • onClick Javascript
  • Mimic Typing from a Textfield in a Textarea with Javascript
  • If, Else If, and Else in Javascript
  • Increment a Variable in Javascript
  • Annoy Users with onBlur in Javascript
  • HTML Title Tag
  • HTML Superscript Text
  • Make Strikethrough Text Using HTML
  • HTML Codes

  • Search iLTC w/ Google





    Recent Articles

  • Javascript Focus Form Field
  • Javascript Lowercase Text
  • Javascript Uppercase Text
  • Javascript Superscript Text
  • Javascript Subscript Text
  • Make Text Blink Using Javascript
  • Make a String into a Link in Javascript
  • Javascript Italics Text
  • Javascript Bold Text
  • Javascript Redirect
  • HTML Frames
  • HTML Color Chart
  • HTML Link
  • Javascript Status Bar








  • Perl Programming - Javascript Programming - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006 iLoveTheCode.com


    Contact Chris | About this Site


    420,504
    Counter by iLoveTheCode.com


    Last Modified: Friday, 23-Jun-2006 07:23:17 EDT