0% found this document useful (0 votes)
3 views1 page

Java 4

The document is an HTML page that demonstrates the use of JavaScript variables. It performs basic arithmetic operations (addition, subtraction, division) on two numbers and displays the results in designated HTML elements. The results are shown with the sum, difference, and quotient formatted to two decimal places.

Uploaded by

ankushkumar53992
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)
3 views1 page

Java 4

The document is an HTML page that demonstrates the use of JavaScript variables. It performs basic arithmetic operations (addition, subtraction, division) on two numbers and displays the results in designated HTML elements. The results are shown with the sum, difference, and quotient formatted to two decimal places.

Uploaded by

ankushkumar53992
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

<!

doctype html>

<html>

<head><title>java script variable</title>

</head>

<body>

<h3> The java script variable</h3>

<p id ="first">computer</p>

<p id ="second">mouse</p>

<p id ="third">education</p>

</body></html>

<script>

var a=12,b=5,sum,sub,div;

sum=a+b;

sub=a-b;

div=a/b;

[Link]("first").innerHTML=sum;

[Link]("second").innerHTML=sub;

[Link]("third").innerHTML=[Link](2);

</script>

You might also like