0% found this document useful (0 votes)
19 views2 pages

Experiment No. 7 Create Web Page To Implement Form Event - Part I (Mouse Event)

The document describes an experiment to create a web page with a textbox and two buttons. Clicking the Up button increases the textbox value by 1, and clicking the Down button decreases it by 1.

Uploaded by

Shubham waghule
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)
19 views2 pages

Experiment No. 7 Create Web Page To Implement Form Event - Part I (Mouse Event)

The document describes an experiment to create a web page with a textbox and two buttons. Clicking the Up button increases the textbox value by 1, and clicking the Down button decreases it by 1.

Uploaded by

Shubham waghule
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

EXPERIMENT NO.

7
Create web page to implement Form Event – Part I (Mouse Event) –
Create a web page with one textbox and two buttons labeled as Down and Up. When
user clicks on Up button the value from textbox will be increase by 1 (i.e. i++). When
user clicks on Down button the value from textbox will be decreased by 1 (i.e. i--).
CODE:
<!--
Aniket Gholap
30
EXP 7
-->
<!DOCTYPE html>
<html>
<head>
<title> Mouse Event </title>
</head>
<body>
<script>
function up() {
var i = document.frm1.t1.value;
i++;
document.frm1.t1.value = i;
}

function down() {
var i = document.frm1.t1.value.value;
i--;
document.frm1.t1..value = i;
}
</script>

<form name=”frm1”>
<input type = “text” name = “t1” > <br />
<input type = “button” name = “b1” value = “DOWN”onclick =
“down()”>
<input type = “button” name = “b2” value = “UP” onclick = “up()”>
</body>
</html>

OUTPUT:
Value Entered Down Button Pressed Up Button Pressed

----------------------------------------------------------------------------------------------------

You might also like