<HTML>
<HEAD><Title> My Simple Calculator</Title>
</HEAD>
<script language="JavaScript">
<!--
function Addit()
{ var num1=document.Calform.One.value; var num2=document.Calform.Two.value;
alert(parseFloat(num1)+parseFloat(num2));
}
function minus()
{ var num1=document.Calform.One.value; var num2=document.Calform.Two.value;
alert(parseFloat(num1)-parseFloat(num2));
}
//-->
</script>
<BODY>Add and Subtract Calculator
<FORM name="Calform">
<P>
First Number:<INPUT TYPE="TEXT" NAME="One" maxlength="3">
<P>
Second Number:<INPUT TYPE="TEXT" NAME="Two" maxlength="3">
<P>
<INPUT TYPE="button" NAME="Add" VALUE="Add Them!!" onclick="Addit()">
<INPUT TYPE="button" NAME="Minus" VALUE="Subtract Them!!"
onclick="minus()">
<INPUT TYPE="RESET" VALUE="Reset!">
</FORM>
</BODY>
</HTML>
......................................................
<html>
<html>
<title>Assignment 2 </title>
<head>
<script type="text/javascript">
var mydate=new Date()
var year=mydate.getFullYear()
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
//if the current date is less than 10, pad it.
if (daym<10)
daym="0"+daym
var dayarray=new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array
("January","February","March","April","May","June","July","August","September","Oct
ober","November","December")
//write out the final results
document.write("<b>"+dayarray[day]+", "+montharray[month]+" "+daym+",
"+year+"</b>")
</script>
</head>
<body>
<Heading1>
<FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE align= center
WIDTH=50% BGColor= gray>WELCOME OUR SERVICES
BY YOUR ID AND
NAME”</MARQUEE></FONT>
</Heading1>
</br>
</br>
<form>
Total Marks:<input type="text" name="totalmarks" />
</br>
Secured Marks: <input type="text" name="securedmarks" />
</br>
Rescale Marks: <input type="text" name="rescalemarks" />
</form>
</body>
</html>
0 comments
Post a Comment