[go: up one dir, main page]

0% found this document useful (0 votes)
27 views6 pages

CAM PartA Labmanual

Uploaded by

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

CAM PartA Labmanual

Uploaded by

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

COMPUTER MULTIMEDIA AND ANIMATION LAB MANUAL

PART A
1. Develop and demonstrate a IlT ML document that illustrates a) Image as a background
b) Hyper link using an image c) Hyperlink with another web page (A, Base, I-Ircf)
d) Link to email address, FTP Websites

PM-A Program-I
<style>
a{color:white;}

<hl style="color:blue"> a.lmage as background </h 1>


<BODY background="l)esert.jpg">
<hl style="color:blue">b.Hyperlink using an image</h 1>
<A HREF="http://www.google.com">
<img src="Tulips.jpg" width="200px" height="200px">

<hl style="color:blue">c.Hyperlink with another web page</h


<!--<base href="https:/ÄAvw.w3schools.com/"target=" blank">-->
<img src="Jellyfish.jpg" width="24" height="39" alt="Jellyfish">
<a href="prgm3.html">HTML base Tag</a>
<hl style="color:blue">d.Link to email address</h 1>

Send Email

q'body>
</html>
OUPUT:

.11yperiink usino au image

GFGC,SHIMOGA. Page 1
COMPUTER MULTIMEDIA AND ANIMATION LAB MANUAL

2. Multimedia: - a) Develop a "eb page to play audio filc using <a>Tag. b) Develop a wcb
page to play video file using <Embcd>Tag.

<head>
<title> video </title>

<embed src="E:\Najmunnisa\cg partb\CAM\PART-A\clgevideo.mp4"controls autoplay>


</embed>
<audio src="C:\Users\Public\Music\Sample Music\Sleep Away.mp3" controls>

</html>
OUTPUT:

3. Write a JavaScript program to determine whether a given year is a leap year in the
Gregorian Calendar.

<H EAD>
<TITLE> JavaScript program to check a given year is a leap year r </TITLE>

<body>
Input Year: <input type="text" id="year">
Leap Year">
<input type = "button" id="button" onClick="leapyear()" value="Check

function leapyear()

Page 2
GFGC,SHIMOGA.
COMPUTER MULTIMEDIA AND ANIMATION LAB MANUAL

var year = document.getElementById("year").value;


if (year>0)
document.getElementByld("GFG").innerI-ITML=(year%4==0)?"leap
year":"not a leap
year",
else
document.getElementById("GFG").innerHTML="invalid input";

</script>
</body>
</html>
OUTPUT:
Input Year: 2000

leap year

Input Year: 2021

not a leap year

Input Year: 202IAA Check Leap Year


Invalid input

4. Write a JavaScript program to convert temperatures to and from Celsius,


Fahrenheit.
<html>
<head>
<title>JavaScript program to convert temperatures to and from celsius, fahrenheit</title>

function temperatureConverter(valNum)

valNum = parseFloat(valNum);
document.getElementById("outputCelsius").innerHTML= (valNum-32)/l .8;
(F-32)/1.8 = C

function temperatureConverterl (valNum l)

GFGC,SHIMOGA.
Page 3
COMPUTER MULTIMEDIA AND ANIMATION LAB MANUAL

(valNum I * I .8)+32;

</head>
<body>
<label> Fahrenheit </label>
<input type="number" placeholder="Fahrenheit"
on input="temperatureConverter(this.value)"
onchange="temperatureConverter(this.value)">

<p> Celsius: <span id="outputCelsius"></span></p>


<p> <label> Celsius </label>
<input id="inputCelsius" type="number"placeholder="Celsius"
on (this.value)"
onchange="temperatureConverterl (this.value)">

<p> Fahrenheit: <span id="outputFahrenheit"></span></p>


</body>
</html>

OUTPUT:

Fahrenheit 3C

Fahrenheit: 140

5. Create an animation using IITML.


<html>
<head>
<style>
div

GFGC,SHIMOGA. Page 4
COMPUTER MULTIMEDIA AND ANIMATION LAB MANUAL

idth:
height: 100px;
backereund-color:red;
position:relative:
animation-name:evample;
animation-duration:4s:

frames example

top:0px;}
25%{background-color:orange;left:200px; top:0px;}
50%{background-color:green;left:200px; top:200px;}
75%{background-color:blue;left:0px: top:200px;}
100% t top:0px;}

</style>

<body>
<h I>Animat ion</h I >
<div>
<p><b>note:</b>When an animation is finished, it goes back to its original style.</p>

</html>

OUTPUT:

Animation

note: ilhen an animation fuushed, it goes back to its ongtnal style.

Page 5
GFGC,SHIMOGA.
COMPUTER MULTIMEDIA AND ANIMATION LAB MANUAL

t't•e that the and offbe numbers from Oto 10and


ITTMt. text that the rc•olting vat-ue•in an HT,MLtable format.

squares cubes from Oto 10

num Squat@ ube!

GFCÆ.SHIMOGA
Page

You might also like