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;
    1725991

    iLoveTheCode.com

    Use OnMouseOver in Javascript

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

    If you've used onClick or OnMouseOut then you already know how to use the onMouseOver 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="#" OnMouseOver="alert('Thanks for the onMouse!')">Need an onMouse?</a>

    -After the OnMouseOver 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 OnMouseOver to call a function is similar and fairly easy:

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

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

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


    Note: An older version of Firefox for Mac hung after executing onMouseOver. It works fine on 2.0.0.12.


    Free Copy and Paste Javascript Code:

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

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

    -->
    </script>

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



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




    Previous Article: Use onClick in Javascript
    Next Article: Use onMouseOut in 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


    1725716
    Counter by iLoveTheCode.com


    Last Modified: Tuesday, 10-Feb-2009 04:47:22 EST



    Hosted as well :)
    Home-brewed logo - 1997