IT Journal Science 2024-25
IT Journal Science 2024-25
JavaScript
6 Creation of two web page in HTML to change
background color
PHP
10 Use of PHP to check if a person is eligible to vote
or not.
Create a webpage using HTML and CSS code to design a web page as the
layout displayed below.The top section will display the heading , ‘Tourist
places’ in header. The section on the left has list of cities. The right hand
side displays tourist places of any one of the city . Use Inline style sheet in
the top section to display background color for the text ‘Tourist places’.
Use internal stylesheet for the left and right section with background
color and font styles.
<html>
<head>
<title> Tourist Place </title>
<style>
section{background-color:yellow;width:50%;height:50%;
float:left;color:black;font-size:30px;outline-style:solid;}
aside{background-
color:pink;width:50%;height:50%;float:right;color:black;
font-size:30px;outline-style:solid;}
ol{font-weight:bold;font-size:20px}
ul{font-weight:bold;font-size:20px}
</style>
</head>
<body>
<header
style="background-color:lightblue;text-align:center;height:30%;width:100
%;font-size:50px;outline-style:solid;color:deeppink;">Tourist
places</header>
<section>
<b>City</b>
<ol>
<li> Pune </li>
<li> Banglore</li>
<li>Delhi</li>
<li> Hydrabad </li>
</ol>
</section>
<aside>
<b>Tourist places</b>
<ul>
<li> Shaniwarwada </li>
<li> Sinhgad </li>
<li> Kelkar Museum </li>
</ul>
</aside>
</body> </html>
Output
Experiment No. 2 :
Create a website using HTML and CSS code to design webpages as
follows – The first webpage will accept the name of the traveller,
date of travel , telephone number . It also has submit button as an
image .The second webpage has information about the name of
transporter, time , seat no and destination displayed one below the
other in the form of unordered list as Name of transporter – Air
Asia Time - 09:30 am Seat no – B39 Destination - Delhi Both pages
should be interlinked. Create external stylesheet with relevant
tags.
<!DOCTYPE html>
<html>
<head>
<title>Information form</title>
<link rel="stylesheet" type="text/css" href="external.css">
</head>
<body>
<h1 align="center">Traveller Information Form</h1>
<form>
Enter your name
<input type="text" name="name" autocomplete><br><br>
Select Date of Traveller
<input type="date" name="trvdate"><br><br>
Enter Telephone Number
<input type="tel" name="phone" pattern="[0-9]{2}-[0-9]{10}
required"><br><br>
</form>
<a href="D:\12th IT\page 2.html">
<img src=" D:\12th IT\Submit Button.jpg" width="150"></a>
</body>
</html>
File Name: page 2.html
<!DOCTYPE html>
<html>
<head>
<title>
Information about transporter
</title>
<link rel="stylesheet" type="text/css" href="external.css">
</head>
<body>
<h1 align ="center"> Information about Transporter</h1>
<ul>
<li>Name of the transporter - Air Asia</li>
<li>Time - 09:30 am</li>
<li>Seat no - B39</li>
<li>Destination - Delhi</li>
</ul>
<a href=" D:\12th IT\page 1.html ">Connect First Page</a>
</body>
</html>
h1{background-color:blue;border-style:double;co
lor:white} body{background-color:lightyellow}
ul{font-family:comic sans ms}
Output:
Experiment No. 3 :
Use of Audio on web pages using HTML5.
Create a webpage named audio.html to set an audio file in web page with
controls such that it uses HTML5 elements. The audio file must play as
soon as the webpage loads in browser and it will start over again, every
time when it is completed.Create another webpage named audio1.html
which provides multiple source file formats for the same audio file that
plays a sound with controls. The browser should display the message with
appropriate attribute, when audio tag is not supported by browser. The
code must incorporate the list of sound files formats (like wav, MP3 or
ogg etc).
Output:
Experiment No. 4 :
Use of video on web pages using html5.
Create a webpage named video.HTML to display a video file on web page and
plays automatically. The dimension of video area should be 150 * 150 pixels.
Create another webpage which video provide multiple source file formats for the
same video file that plays a video with controls. The dimension of video area should
be 300*300 pixels. The browser should display the message with appropriate
attribute when video tag is not supported by browser. The code must incorporate
the list of video files formats (like webM, MP4 or ogg etc).
<!DOCTYPE HTML>
<html>
<head><title>image map</title>
</head>
<body>
<h1>An example of Image Map</h1>
<img src="C:\Users\PACE 07\Pictures\sky.jpg"
usemap="#imagemap" alt="Image " height="500" width="550">
<map name="imagemap">
<area href="http://www.google.com" shape="rect"
coords="57,230,223,277" alt="google site"/>
<area href=" C:\Users\PACE 07\Documents\12th IT\Chapter 1
Advanced Web Designing\float property.html" shape="circle"
coords="266,92,40" alt="html file"/>
<area href="http://mahahsscboard.in"
shape="poly"coords="360,255,438,311,406,413,309,412,278,312"
alt="maharashtra stateboard site"/>
</map>
</body></html>
Output:
JavaScript
Experiment No. 6 :
Create a web page in HTML having a white background and one Button Object.
Write code using JavaScript such that when the mouse is placed over the first
button object without clicking, the color of the background of the page should
change after every seconds. There should at least be 7 different and visibly
distinct background colors excluding the default color. Create another web page
using JavaScript where the background color changes automatically after every
seconds. This event must be triggered automatically after the page gets loaded in
the browser. There should at least be 7 different and visibly distinct background
colors.
File Name: chang background color page1.html
<!doctype html>
<html>
<head>
<script type="text/javascript">
function red()
{
document.bgColor="red"; window.setTimeout("yellow()",5000)
}
function yellow()
{
document.bgColor="yellow"; window.setTimeout("pink()",5000)
}
function pink()
{
document.bgColor="pink"; window.setTimeout("green()",5000)
}
function green()
{
document.bgColor="green"; window.setTimeout("orange()",5000)
}
function orange()
{
document.bgColor="orange"; window.setTimeout("purple()",5000)
}
function purple()
{
document.bgColor="purple"; window.setTimeout("blue()",5000)
}
function blue()
{
document.bgColor="blue"; window.setTimeout("red()",5000)
}
</script>
</head>
<body>
<center>
<h1>CHANGE BACKGROUND COLOR AFTER EVERY FIVE SECONDS</h1>
<input type="button" value="CHANGE BACKGROUND COLOR" onmouseover="red()">
<center>
</body>
</html>
Output:
File Name: File Name: chang background color page2.html
<!doctype html>
<html>
<head>
<script type="text/javascript">
function f1()
{
document.bgColor="red";
window.setTimeout("f2()",5000);
}
function f2()
{
document.bgColor="yellow";
window.setTimeout("f3()",5000);
}
function f3()
{
document.bgColor="blue";
window.setTimeout("f4()",5000);
}
function f4()
{
document.bgColor="pink";
window.setTimeout("f5()",5000);
}
function f5()
{
document.bgColor="purple";
window.setTimeout("f6()",5000)
}
function f6()
{
document.bgColor="orange";
window.setTimeout("f7()",5000)
}
function f7()
{
document.bgColor="brown";
window.setTimeout("f1()",5000);
}
</script>
</head>
<body onload="f1()">
<h1 align="center">CHANGE BACKGROUND COLOR AFTER 5 SECONDS
AUTOMATICALLY</h1>
</body>
</html>
Output:
Experiment No. 7 :
Create an event driven JavaScript program for the following. Make use
of appropriate variables, JavaScript inbuilt string functions and control
structures. To accept string from user and count number of vowels in
the given string.
Experiment No. 8 :
Create event driven JavaScript program to convert temperature to and from Celsius,
Fahrenheit.Formula: c/5= (f-32)/9 [where c=Temperature in Celsius and f=Temperature in
Fahrenheit.]
Output format : 40 Celsius=104 Fahrenheit 45 Fahrenheit = 7.22222222 Celsius
File Name:temperature.html
<!DOCTYPE html>
<html>
<head><title>Experiment No. 8 TEMPERATURE</title>
<script type="text/javascript">
function temperature()
{
var c,f,ctof,ftoc;
c=form1.t1.value;
f=form1.t2.value;
ctof=c*9/5+32; ftoc=(f-32)*5/9;
document.form1.t3.value=ctof;
document.form1.t4.value=ftoc;
}
</script>
</head>
<body>
<form
name="form1">
Enter number in
Celcious:
<input type="text" name="t1"><br><br> Enter number in Fahrenheit:
<input type="text" name="t2"><br><br> Result in Celcious to Fahrenheit:
<input type="text" name="t3"><br><br> Result in Fahrenheit to Celcious:
<input type="text" name="t4"><br><br>
<input type="button" value="Convert" onclick="temperature()">
</form>
</body>
</html>
Output:
Experiment No. 9 :
Create JavaScript program which compute the average marks of
students. Accept six subject marks of student from user.
Calculate average marks of student which is used to determine
the corresponding grades.
Range Grade
35 to 60 F
61 to 70 D
71 to 80 C
81 to 90 B
91 to 100 A
Output:
Experiment No. 12:
Write a program using PHP to calculate Electricity bill by accepting the
limits.
• For first 100 units - Rs. 4
• For next 100 units - Rs. 5
• For next all units - Rs. 6