| Server IP : 23.94.149.180 / Your IP : 216.73.216.147 Web Server : nginx/1.20.1 System : Linux deadrock 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 15:18:14 UTC 2026 x86_64 User : nginx ( 991) PHP Version : 8.6.0 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /files/www/hacklab/peterson/ |
Upload File : |
<html>
<head>
<title> onMouseOver & onMouseOut </title>
<script language = "JavaScript">
<!--Begin JavaScript hide
//JavaScript Homework #2 for CIS24,
Spring 2000, Thursday evening class
Using Netscape 4.7
by Linda Peterson
//Preload the images by creating image objects and
initialize them
var pic1out=new Image(); //Active pictures
pic1out.src="Utahout.jpg";
var pic2out=new Image();
pic2out.src="Colout";
var pic3out=new Image();
pic3out.src="Goldout";
var pic1over=new Image(); //Inactive pictures used when onMouseOver event occurs
pic1over.src="Utahover.jpg";
var pic2over=new Image();
pic2over="Colover.jpg";
var pic3over=new Image();
pic3over.src="Goldover";
//end JavaScript hide -->
</script>
</head>
<body>
<body bgcolor="white">
<center>
<h1><font face="Verdana" color="blue">Summer Vacation</font></h1>
<!--Create the rollover, the <a href="... onMouseOver . . .
causes the picture to change when the mouse is over the picture.
The onMouseOut . . . line tells it to switch back to the original
picture as the mouse exits the picture.
The <img src= . . . creates the initial picture and a name attribute
is defined. -->
<a href="javascript:void(0)" onMouseOver="document.pic1.src='Utahover.jpg' "
onMouseOut="document.pic1.src='Utahout.jpg'">
<img src="Utahout.jpg" width=180 height=120 border=5 hspace=5 vspace=5 name="pic1"></a>
<!--Create the 2nd rollover, the <a href="... onMouseOver . . .
causes the picture to change when the mouse is over the picture.
The onMouseOut . . . line tells it to switch back to the original
picture as the mouse exits the picture.
The <img src= . . . creates the initial picture and a name attribute
is defined.-->
<a href="javascript:void(0)" onMouseOver="document.pic2.src='Colover.jpg' "
onMouseOut="document.pic2.src='Colout.jpg'">
<img src="Colout.jpg" border=5 hspace=5 vspace=5 name="pic2"></a>
<!--Create the 3rd rollover, I realize at this point I should be
using a function to take care of the redundant entries, but
I'm barely hanging on to the raft, and I've ran out of time.-->
<a href="javascript:void(0)" onMouseOver="document.pic3.src='Goldover.jpg' "
onMouseOut="document.pic3.src='Goldout.jpg'">
<img src="Goldout.jpg" border=5 hspace=5 vspace=5 name="pic3"></a>
<p> <font size=3 face="Verdana"> The pictures above are from one of our summer vacations,
the canyon shots are from Utah. The photo with the strange structure is at the Air
Force Academy in Colorado Springs, and of course we had to find a
golf course. The last pictures are from a gold panning trip in California.</p>
<p> Did you see the golf course?</p>
<p> If not try pointing your mouse at the pictures.</font></p>
</body>
</html>