Thursday, 1 November 2018

How to make a SIMPLE CALCULATOR USING HTML without using Javascript

Learn to Make a Simple CALCULATOR in just 2 minutes with  HTML without using JavaScript or CSS.
                                                  (2 minutes coding)
  
Steps to make your own calculator



1.  Open NOTEPAD or NOTEPAD++ in your computer .
2. Copy the code given below .
<html>

<head>
<title>HTML Calculator</title>
</head>
<body alignment="center" bgcolor= "black" text= "RED">
<H1 >CALCULATOR</H1>
<form name="calculator" >
<input type="button" value="1" onClick="document.calculator.display.value+='1'">
<input type="button" value="2" onClick="document.calculator.display.value+='2'">
<input type="button" value="3" onClick="document.calculator.display.value+='3'">
<br>
<input type="button" value="4" onClick="document.calculator.display.value+='4'">
<input type="button" value="5" onClick="document.calculator.display.value+='5'">
<input type="button" value="6" onClick="document.calculator.display.value+='6'">
<br>
<input type="button" value="7" onClick="document.calculator.display.value+='7'">
<input type="button" value="8" onClick="document.calculator.display.value+='8'">
<input type="button" value="9" onClick="document.calculator.display.value+='9'">
<br>
<input type="button" value="0" onClick="document.calculator.display.value+='0'">
<input type="button" value="-" onClick="document.calculator.display.value+='-'">
<input type="button" value="+" onClick="document.calculator.display.value+='+'">
<br>
<input type="button" value="*" onClick="document.calculator.display.value+='*'">
<input type="button" value="/" onClick="document.calculator.display.value+='/'">
<input type="button" value="=" onClick="document.calculator.display.value=eval(document.
calculator.display.value)">
<br>
<input type="reset" value="Reset">
Result <input type="textfield" name="display" value="">
</form>
</body>
</html>

3. Now paste it in your Notepad file.


3. Now save your file with .html extension.
4. File will appear like this.
5. Now open the file in any browser except internet explorer.



14 comments:

  1. it is really working
    thanks for the code

    ReplyDelete
  2. I read this article. I think You put a great deal of exertion to make this article. I like your work. inches to feet

    ReplyDelete
  3. Might be identified dissertation website using the web novels experience plainly mentioned on the web-site. java developer

    ReplyDelete
  4. Unfortunately, the onclick attribute holds JavaScript, even it is not declared in a separate script tag...
    Nice solution, though

    ReplyDelete
  5. Very simple way to create a calculator
    Good job

    ReplyDelete
  6. Very good
    I hv also used this code for creating calculator

    ReplyDelete

DBMS NOTES UNIT 3

                                                              UNIT 3  ER (Entity Relationship) An entity-relationship model is known as an E...