-->

How to add A Calculator in your Blog or Website Using JavaScript CSS HTML

Guy, Today i am going to share a simple tips for your blog or website. Here are the some steps to create a simple calculator using HTML and JavaScript which can evaluate simple arithmetic on integer numbers. AS we all know that mathematics is very important for us every day and we can create any calculation using calculator and we can also create and develop calculator by using all of the programming language like C, C++, Java,Visual Basic(VB) etc. 

A Calculator in your Blog or Website

Add A Calculator in your Blog
  •  Login to Blogger > Dashboard
  •  Now Go to Page option > Click on New Page
  •  Select HTML  
  •  Paste below code in it.



    <html>
    <head></head>
    <body>
    <h3>Simple Calculator</h3>
    <br/>
    <form Name="calc">
    <table border=2>
    <tr>
    <td colspan=4><input type=text Name="display"></td>
    </tr>
    <tr>
    <td><input type=button value="0" OnClick="calc.display.value+='0'"></td>
    <td><input type=button value="1" OnClick="calc.display.value+='1'"></td>
    <td><input type=button value="2" OnClick="calc.display.value+='2'"></td>
    <td><input type=button value="+" OnClick="calc.display.value+='+'"></td>
    </tr>
    <tr>
    <td><input type=button value="3" OnClick="calc.display.value+='3'"></td>
    <td><input type=button value="4" OnClick="calc.display.value+='4'"></td>
    <td><input type=button value="5" OnClick="calc.display.value+='5'"></td>
    <td><input type=button value="-" OnClick="calc.display.value+='-'"></td>
    </tr>
    <tr>
    <td><input type=button value="6" OnClick="calc.display.value+='6'"></td>
    <td><input type=button value="7" OnClick="calc.display.value+='7'"></td>
    <td><input type=button value="8" OnClick="calc.display.value+='8'"></td>
    <td><input type=button value="x" OnClick="calc.display.value+='*'"></td>
    </tr>
    <tr>
    <td><input type=button value="9" OnClick="calc.display.value+='9'"></td>
    <td><input type=button value="C" OnClick="calc.display.value=''"></td>
    <td><input type=button value="=" OnClick="calc.display.value=eval

    (calc.display.value)"></td>
    <td><input type=button value="/" OnClick="calc.display.value+='/'"></td>
    </tr>
    </table>
    </form>
    </body>
    </html>

Related Search Terms

Simple Calculator


You May Like Also Also Like This

Post a Comment

6 Comments

  1. Learning new technolgoy would help oneself at hard part of their career. And staying updated is the only way to survive in current position. Your content tells the same. Thanks for sharing this information in here. Keep blogging like this.

    JAVA Training in Chennai | Mobile application testing training in Chennai | Hadoop training in chennai

    ReplyDelete
  2. Thanks for sharing this unique and informative content which provided me the required information.
    Java Training in Chennai | JAVA Course in Chennai

    ReplyDelete