|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mouse Action
How can I activate (code) so that when my mouse points any link it will show differently (probably large in size with differnet color).
|
|
#2
|
||||
|
||||
|
Use the onMouseOut and onMouseOver events. If you are using Dreamweaver, it can generate mouseovers for you. Some other web design tools might do this for you. Here's some sample code.
Ex: 1) The javascript code needed to process the images. This can go in the <head></head> tags of your page. <script language="JavaScript"> <!-- if (document.images) { image1on = new Image(); image1on.src = "images/someimage.jpg"; } // The function that changes the images function changeImages() { if (document.images) { for (var i=0; i<changeImages.arguments.length; i+=2) { document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src"); } } } // --> </script> 2) In your code, use the mouseover events like this: <a href="page.asp" onMouseOver="changeImages('image1', 'image1on')" onMouseOut="changeImages('image1', 'image1off')" ><img name="image1" src="images/animage.jpg"></a> Hope this helps Last edited by dcarva : October 20th, 2003 at 04:38 PM. |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Mouse Action |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|