Tuesday 16 January 2018

working calculator without using javascript

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
="calconclick="ans.value=eval(ans.value)">
<hr size="10px">
<input type="buttonvalue="1onclick="ans.value=ans.value+('1')">
<input type="buttonvalue="2onclick="ans.value=ans.value+('2')">
<input type="buttonvalue="3onclick="ans.value=ans.value+('3')"><br>
<input type="buttonvalue="4onclick="ans.value=ans.value+('4')">
<input type="buttonvalue="5onclick="ans.value=ans.value+('5')">
<input type="buttonvalue="6onclick="ans.value=ans.value+('6')"><br>
<input type="buttonvalue="7onclick="ans.value=ans.value+('7')">
<input type="buttonvalue="8onclick="ans.value=ans.value+('8')">
<input type="buttonvalue="9onclick="ans.value=ans.value+('9')"><br>
<input type="buttonvalue="+onclick="ans.value=ans.value+('+')">
<input type="buttonvalue="0onclick="ans.value=ans.value+('0')">
<input type="buttonvalue="*onclick="ans.value=ans.value+('*')"><br>
<input type="buttonvalue="/onclick="ans.value=ans.value+('/')">
<input style="color:blue; background-color:white;"type="buttonvalue="clearonclick="ans.value=('')">
<input type="buttonvalue="-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