Practical 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Client side Scripting Language

(22519)

Name of Student: Ritesh Doibale Roll No.: 41


Experiment No.: 01
Write a Javascript with html For Message Printing .

<html>
<h3> Message Printing</h3>
<script language="JavaScript">

document. write("Hello

World!"); alert("Hello World!");


</script>
</html>

Output
Client side Scripting Language
(22519)

2. Perform Arithmetic of Two Numbers

<html>
<h3>Arithmetic Expression</h3>
<body>
<script type="text/JavaScript">
var a = Number(prompt("Enter the first number",0));
var b = Number(prompt("Enter the second
number",0)); document.write("A+B =
"+(a+b)+"<br/>"); document.write("A-B = "+(a-b)
+"<br/>"); document.write("A*B = "+(a*b)+"<br/>");
document.write("A/B = "+(a/b)+"<br/>");
</script>
</body>
</html>

Output
Client side Scripting Language
(22519)

You might also like