Sunday 8 December 2013

HTML Calculator

You can make HTML Calculator
open notepad and copy the code below
<body>
<title>SNF's Calculator</title>
<center>
<h1><FONT COLOR="red">You can Select Background colours</FONT
<br>

<form name="bg">
<input type="button" name="green" value="Green" onClick="document.bgColor='Green'">
<input type="button" name="sky blue" value="Sky Blue" onclick="document.bgColor='Sky Blue'">
<input type="button" name="yellow" value="Yellow" onclick="document.bgColor='Yellow'">
</form>
<br>
<form name="bg">
<input type="button" name="white" value="White" onClick="document.bgColor='White'">
<input type="button" name="red" value="Maroon" onclick="document.bgColor='maroon'">
<input type="button" name="Black" value="Black" onclick="document.bgColor='Black'">
<input type="button" name="Rainbow" value="Rainbow" onClick="document.bgColor='rainbow'">
</form>

<form name="calc">
<table boder="5" bgcolor="red">
<tr bgcolor="pink"><h0><font color="violet">SNF<font/>
<td>
<input type="text" name="keys" value="" size="12"><br>
</td>
</tr>
<tr>
<td>
<input type="button" name="one" value=" 1 " onClick="calc.keys.value +='1'">
<input type="button" name="two" value=" 2 " onClick="calc.keys.value +='2'">
<input type="button" name="three" value=" 3 " onClick="calc.keys.value +='3'">
<input type="button" name="four" value=" 4 " onClick="calc.keys.value +='4'">

<br>
<input type="button" name="five" value=" 5 " onClick="calc.keys.value +='5'">
<input type="button" name="six" value=" 6 " onClick="calc.keys.value +='6'">
<input type="button" name="seven" value=" 7 " onClick="calc.keys.value +='7'">
<input type="button" name="eight" value=" 8 " onClick="calc.keys.value +='8'">

<br>
<input type="button" name="nine" value=" 9 " onClick="calc.keys.value +='9'">
<input type="button" name="zero" value=" 0 " onClick="calc.keys.value +='0'">
<input type="button" name="one" value=" . " onClick="calc.keys.value +='.'">
<br>
<input type="button" name="Plus" value=" + " onClick="calc.keys.value +='+'">
<input type="button" name="minus" value=" - " onClick="calc.keys.value +='-'">
<input type="button" name="times" value=" x " onClick="calc.keys.value +='*'">
<input type="button" name="divide" value=" % " onClick="calc.keys.value +='/'">
<br>
<input type="button" name="equal" value=" = " onClick="calc.keys.value = eval(calc.keys.value)">
<input type="button" name="clear" value=" C " onClick="calc.keys.value=''">

</form>

<br>
<br>
<form name="SNF">
<table boder="5" bgcolor="red">
<tr bgcolor="pink">
<input type="button" name="keys" value="" size="20"><br>
</td>
</tr>
<tr>
<td>
<input type="button" name="About" value=" About " onClick="SNF.keys.value +='SNF Calculator v0.0.1'">
</form>
</center>

<marquee behavior="alternate">SNF Calculator v0.0.1</marquee>
<br>
and paste it in notepad 
save as .html format
and open the file
for more details see this video