Webapp
Webapp
<html>
<head>
<script>
function evenodd()
n1=parseInt(document.f1.txt1.value)
if(n1%2==0)
document.f1.txt2.value="Even"
else
document.f1.txt2.value="Odd"
</script>
</head>
</body>
<form name=f1>
<br><br>
</form>
</body>
</html>
TWO 2)
<html>
<head>
<script>
function cal()
n1=parseInt(document.f1.txt1.value)
n2=parseInt(document.f1.txt2.value)
n3=parseInt(document.f1.txt3.value)
n4=n1*n2*n3/100
document.f1.txt4.value=n4
</script>
</head>
</body>
<form name=f1>
<br><br>
<br><br>
<br><br>
<br><br>
</form>
</body>
</html>
THREE 3)
<html>
<script>
function add()
n1=parseInt(document.form1.txt1.value)
n2=parseInt(document.form1.txt2.value)
document.form1.txt3.value=n1+n2
function sub()
n1=parseInt(document.form1.txt1.value)
n2=parseInt(document.form1.txt2.value)
document.form1.txt3.value=n1-n2
function mul()
n1=parseInt(document.form1.txt1.value)
n2=parseInt(document.form1.txt2.value)
document.form1.txt3.value=n1*n2
function div()
n1=parseInt(document.form1.txt1.value)
n2=parseInt(document.form1.txt2.value)
document.form1.txt3.value=n1/n2
function mod()
n1=parseInt(document.form1.txt1.value)
n2=parseInt(document.form1.txt2.value)
document.form1.txt3.value=n1%n2
</script>
<body>
<form name=form1>
<br> <br>
<br><br>
</form>
</body>
</html>
FOUR 4)
<html>
<head>
<script>
function num()
n1=parseInt(document.f1.start.value)
n2=parseInt(document.f1.end.value)
s=''
for(i=n1+1;i<=n2-1;i++)
s=s+i+''
document.getElementById("p1").innerHTML=s
</script>
<body>
<form name=f1>
<br><br>
</form>
</body>
</html>
Output
FIVE 5)
<script>
n1=parseInt(prompt("Enter n1:"))
n2=parseInt(prompt("Enter n2:"))
n3=parseInt(prompt("Enter n3:"))
n4=parseInt(prompt("Enter n4:"))
n5=parseInt(prompt("Enter n5:"))
sum=n1+n2+n3+n4+n5
alert(sum)
</script>
Output
SIX 6)
<html>
<script>
function bw()
n1=document.f1.txt1.value
n2=document.f1.txt2.value
r=document.f1.r1.value
if(r=="m")
alert("Mr."+n1.charAt(0)+"."+n2+",for visiting our website.")
else
</script>
<body>
<form name=f1>
<br><br>
<br><br>
Gender
<br><br>
<br><br>
<br><br>
</body>
</form>
</html>
Output
SEVEN 7)
<html>
<body>
<form name=f1>
</form>
</body>
<script>
function opensite(s)
open(s,target="_Self")
</script>
</html>
Output
EIGHT 8)
<html>
<head>
<script>
function cal()
n1=parseInt(document.f1.txt1.value)
n2=parseInt(document.f1.txt2.value)
n3=parseInt(document.f1.txt3.value)
n4=n1*n2*n3/100
document.f1.txt4.value=n4
document.f1.txt5.value=n1+n4
function calc()
n1=parseInt(document.f1.txt1.value)
n2=parseInt(document.f1.txt2.value)
n3=parseInt(document.f1.txt3.value)
n4=n1*(1+n2/100)^n3
document.f1.txt4.value=n4-n1
document.f1.txt5.value=n4
</script>
</head>
</body>
<form name=f1>
rate:<input name=txt2>
time:<input name=txt3>
<br><br>
Interest Type
<br><br>
<hr>
Interest:<input name=txt4>
<br><br>
</form>
</body>
</html>
Output