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

Unit 6-1

MSBTE JavaScipt I scheme notes unit 6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Unit 6-1

MSBTE JavaScipt I scheme notes unit 6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Status Bar

Building Static Message


Not supported in modern browser.

<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
window.status="Welcome to status bar. This is static message";
</script>
</head>
<body>
<h3>Building Static Message</h3>
</body>
</html>

Changing message using Rollover


<!DOCTYPE html>
<html>
<body>
<h3>Image Rollover</h3>
<a onmouseover="window.status='Welcome to status bar. This is apple'">
<b>Apple</b>
</a>
<br><br>
<a onmouseover="window.status='Welcome to status bar. This is a pineapple'">
<b>PineApple</b>
</a>
</body>
</html>

Client Side Scripting (Unit 6) Arrow Computer Academy


Banner
 Loading and Displaying Banner Advertisements

<!DOCTYPE html>
<html>
<body>
<img src="mickey.jpeg" style="width: 50%">
</body>
</html>

 Change Images in Banner

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
banner_array = new Array('mango.jpeg', 'pineapple.jpeg','banana.jpeg')
banner=0
function DisplayBanner()
{
if(document.images)
{
banner++
if (banner==banner_array.length)
{
banner = 0;
}
document.ChangeBanner.src = banner_array[banner]
setTimeout("DisplayBanner()", 5000)
}
}
</script>
</head>
<body onload="DisplayBanner()">

<img src="mango.jpeg" style="width: 50%" name="ChangeBanner">


</body>
</html>

Client Side Scripting (Unit 6) Arrow Computer Academy


 Linking a banner Advertisement to URL

<!DOCTYPE html>
<html>
<head>
<body>
<a
href="https://arrowcomputeracademy.business.site/?utm_source=gmb&utm_medium=referral">
<img src="mango.jpeg" style="width: 50%" name="ChangeBanner">
</body>
</html>

Slideshow

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
img_array = new Array('mango.jpeg', 'pineapple.jpeg','banana.jpeg')
count=0
function SlideShow(num)
{
if(document.images)
{
count=count+num;
if (count==img_array.length)
{
count = 0;
}
if (count<0)
{
count = img_array.length-1;
}

document.img1.src = img_array[count]
}
}
</script>
</head>
<img src="mango.jpeg" style="width=200" height="300" name="img1">
<br>
<input type="button" value="Back" onclick="SlideShow(-1)">
<input type="button" value="Next" onclick="SlideShow(1)">

</body>
</html>

Client Side Scripting (Unit 6) Arrow Computer Academy

You might also like