CALCULATOR MADE USING CSS AND HTML.
Hello! Friends in this page i will show you how you can make a stylish or just a simple calculator using just the knowledge of html only . it dosent involves javascript. You can add css to style your calculator in your own way here i will show only the code of simple multi functioning calculator.
|
| <html> <head> <title>calculator </title> </head> <body> <input type="text" value="" name="ans"> <input type="button" name="calc" onclick="ans.value=eval(ans.value)"> |
| <hr size="10px"> |
| <input type="button" value="1" onclick="ans.value=ans.value+('1')"> |
| <input type="button" value="2" onclick="ans.value=ans.value+('2')"> |
| <input type="button" value="3" onclick="ans.value=ans.value+('3')"><br> |
| <input type="button" value="4" onclick="ans.value=ans.value+('4')"> |
| <input type="button" value="5" onclick="ans.value=ans.value+('5')"> |
| <input type="button" value="6" onclick="ans.value=ans.value+('6')"><br> |
| <input type="button" value="7" onclick="ans.value=ans.value+('7')"> |
| <input type="button" value="8" onclick="ans.value=ans.value+('8')"> |
| <input type="button" value="9" onclick="ans.value=ans.value+('9')"><br> |
| <input type="button" value="+" onclick="ans.value=ans.value+('+')"> |
| <input type="button" value="0" onclick="ans.value=ans.value+('0')"> |
| <input type="button" value="*" onclick="ans.value=ans.value+('*')"><br> |
| <input type="button" value="/" onclick="ans.value=ans.value+('/')"> |
| <input style="color:blue; background-color:white;"type="button" value="clear" onclick="ans.value=('')"> |
| <input type="button" value="-" onclick="ans.value=ans.value+('-')"> |
| </form> </body> </html>
Comment your suggestions regarding this post.
See also how to make a keylogger using c++.
Be happy and have fun. |
|
|
|
No comments:
Post a Comment