HTML CODING FOR MAKING A SIMPLE CALCULATOR-
<html> <head> <title>HTML Calculator</title> </head><font size="9"><!#000000> <body bgcolor= "skyblue" ><center> <form name="calculator" > <input type="textfield" style="height:75px;width:500px;font-size:18pt;" name="ans" value=""> <br><br><input type="reset" style="height:50px;width:100px;font-size:12pt;" value="Reset"><br> <input type="button" value="*" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='*'"> <input type="button" value="+" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='+'"> <input type="button" value="-" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='-'"> <input type="button" value="/" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='/'"> <input type="button" value="=" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value=eval(document.calculator.ans.value)"> <br> <input type="button" style="height:50px;width:100px;font-size:12pt;" value="1" SIZE="50%" onClick="document.calculator.ans.value+='1'" > <input type="button" value="2" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='2'"> <input type="button" value="3" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='3'"> <br> <input type="button" value="4" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='4'"> <input type="button" value="5" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='5'"> <input type="button" value="6" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='6'"> <br> <input type="button" value="7" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='7'"> <input type="button" value="8" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='8'"> <input type="button" value="9" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='9'"> <br> <input type="button" value="0" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='0'"> <input type="button" value="00" style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='00'"> <input type="button" value="." style="height:50px;width:100px;font-size:12pt;" onClick="document.calculator.ans.value+='.'"> </form><hr color="red"> <h4>MADE BY VALA BHAGIRATH SINGH</h1> </body> </html>
No comments:
Post a Comment