Professional Documents
Culture Documents
Programs :
Q. create a form to accept doctor's name, number of patients and date of operation
Q. Write a html program to getting input of email of hotel, date of foundation and number of tables.
The data should be sent to the server.
Q. Write a program with ordered list of 3 flowers and unordered list of 3 fruits
SE
Q. Write an event driven javascript program for printing numbers from 1 to 100, when the mouse
is moved over a button.
<!DOCTYPE html>
<html>
O
<head>
<title>Document</title>
<script type="text/javascript">
function printnumbers() {
//print number from 1-100
D
KA
for (var i = 1; i <= 100; i++) {
document.write(i + "<br>");
}
}
</script>
E
</head>
<body>
D
</body>
</html>
C
Q. Write an event driven program to calculate area of the circle. Take radius from user
(3.14*r*r)
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
<script type="text/javascript">
function calculateArea() {
var r = form1.radius.value;
document.write("Area of circle is :" + 3.14 * r * r);
}
</script>
</head>
SE
<body>
<form name="form1">
<input type="text" name="radius" placeholder="Enter radius" /><br
/><br />
O
<input
type="button"
/>
onclick="calculateArea()"
value="Calculate area of the circle"
D
KA
</form>
</body>
</html>
E
Q. Write an event driven program to calculate area of the rectangle. Take values from user
D
(l*h)
<!DOCTYPE html>
O
<html>
<head>
C
<title>Document</title>
<script type="text/javascript">
function calculateArea() {
var l = form1.length.value;
var b = form1.breadth.value;
document.write("Area of rectangle is :" + l * b);
}
</script>
</head>
<body>
<form name="form1">
Enter Length : <input type="text" name="length" /><br /><br />
Enter Breadth : <input type="text" name="breadth" /><br /><br />
<input
type="button"
onclick="calculateArea()"
SE
value="Calculate area of the rectangle"
/>
</form>
</body>
O
</html>
D
Q. Write an event driven program to calculate perimeter of the circle. Take radius from user
KA
(2*3.14*r)
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
E
<script type="text/javascript">
function perimeter() {
D
var r = form1.radius.value;
document.write("Perimeter of the circle :" + 2 * 3.14 * r);
O
}
</script>
C
</head>
<body>
<form name="form1">
Enter radius : <input type="text" name="radius" /><br /><br />
<input
type="button"
onclick="perimeter()"
value="Calculate perimeter of the circle"
/>
</form>
</body>
</html>
Q. Write an event driven program to calculate area of the triangle. Take values from user
(½*b*h)
SE
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
O
<script type="text/javascript">
function perimeter() {
var b = form1.base.value;
var h = form1.height.value;
D
document.write(" Area of the triangle :" + (1 / 2) * b * h);
KA
}
</script>
</head>
<body>
<form name="form1">
E
<input
type="button"
O
onclick="perimeter()"
value="Calculate area of the triangle"
C
/>
</form>
</body>
</html>
Q. Write a program to accept name of college,name , number of halls (range upto 1000) and send
to the user
<!DOCTYPE html>
<html>
<head>
<title>Document</title>
<script type="text/javascript">
SE
//Check if entered number is less than or greater than 100
var a = parseInt(prompt("Enter a number:"));
if (a < 100) {
document.write("Entered number is less than 100");
O
} else if (a > 100) {
document.write("Entered number is greater than 100");
} else {
} D
document.write("Entered number is equal to 100");
KA
</script>
</head>
<body></body>
</html>
E
D
O
Theory :
SE
O
D
KA
E
D
O
C