English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi people,

How do I use the onmouseover function to do these two things at a time - change image on the same spot and show the style cursor hand? I know how to do only one of them but when I try to add the second function, it didn't work. Hope there is an expert out there who can help. Thanks a lot!

2007-08-22 07:59:47 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

onmouseover="function1(); function2();" (without the space between function1 and function2 . Yahoo! truncates the code.)

Alternatively, you could call function2() from within function1().

The semi-colon between the two functions is very important; it lets the script know that it has to process a new line of code.

2007-08-22 09:29:21 · answer #1 · answered by Anonymous · 0 0

To use multiple javascript commands in an onmouseover tag you just need to seperate them with a semi-colon ; like this:



However, to simply make the "hand" show up when you are over the element just add style="cursor: pointer;" to your element. There is really no reason to have this in the onmouseover event.

2007-08-22 16:03:05 · answer #2 · answered by J P 4 · 1 0

2007-08-22 15:07:41 · answer #3 · answered by Big D 4 · 0 0

fedest.com, questions and answers