0% found this document useful (0 votes)
0 views

CSS_13

Uploaded by

gxyz8837
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

CSS_13

Uploaded by

gxyz8837
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Practical No.

13

Name: Vedraj Sanjay Jagdale.

Enrollment No.: 2215770092

Roll No.: 21 Batch No.: T1

1. Write a JS program to create a rollover effect.

Program:

<!DOCTYPE html>

<html>

<head>

<title>Image Rollover</title>

<style>

#myImage

{ max-width: 100%;

max-height: 100%;

</style>

</head>

<body>

<img id="myImage" src="image1.jpg" onmouseover="changeImage(true)"


onmouseout="changeImage(false)">

<script>

var image = document.getElementById("myImage");

function changeImage(over) {

if (over) {

// Change the image when the mouse is over it

image.src = "image2.jpg";

} else {

// Change it back to the normal image when the mouse is not over it

image.src = "image1.jpg";

You might also like