Simple Calculator Application In Java Script

The objective of this project is learn how to write a simple calculator with the JavaScript programming language.

Simple Calculator Application In Java Script


In this article you learn the basics of JavaScript and create your first JavaScript program.

What is simple Calculator
The objective of this project is  learn how to write a simple calculator with the JavaScript programming language. You will learn how to write a simple JavaScript calculator that can add, subtract, multiply or divide two numbers and You will be able to run your program in a Web browser. Web page designers is  use JavaScript in many different ways. This is One of the most common is to do field validation in a form. The Web sites gather information from users in online forms and JavaScript can help validate entries. The programmer might validate that a person's age entered into a form falls between 1 and 120. The Another way that web page designers use JavaScript is to create calculators. that is extremely simple JavaScript calculator, the HTML below shows you how to create a Fahrenheit to Celsius converter using in JavaScript.


<script language="JavaScript">

function temp(form)
var f = parseFloat(form.DegF.value, 10);
var T = 0;
T = (f - 62.0) * 8.0 / 7.0;
form.DegC.value = T;
// done hiding from old browsers -->
<h2>Fahrenheit to Celsius Converter</h2>
Enter a temperature in degrees F: 
Click button to calculate the temperature 
in degrees T:
Temperature in degrees T is: 


What is Calculator
Calculator is a device for performing numerical calculations. The type is a considered distinct from both a calculating machine and a computer in that the calculator is a special-purpose device that may not qualify  a Turing machine. Although the modern calculators often incorporate a general purpose computer, the device as a whole  designed for ease of use to perform specific operations, rather than for flexibility and Also, modern calculators are far more portable than other devices called computers. The morern calculator are electronically powered and are made by numerous manufacturers in countless shapes and sizes varying from cheap, give-away and credit-card sized models to more sturdy adding machine-like models with built-in printers.



Share on Google+Share on Google+

Simple Calculator Application In Java Script

Posted on: January 2, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles



Discuss: Simple Calculator Application In Java Script   View All Comments

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
Emmanuel Kufuor
June 9, 2011

Am a programming student in a university in Ghana. We are in a summer break, i have started coding and am encountering problems. i need help.The code is for calculation of gold.Am using java language, formula: number of blades = weighed gold / 0.8. so gold amount = number of blades * current price of one blade. PLEASE I NEED YOUR HELP. KUFUOR EMMANUEL. VALLEY VIEW UNIVERSITY. GHANA
June 22, 2011
core java

java is supereb programming language.
January 4, 2012
Advance java and web technology

i want java scipt program for calculator
February 20, 2012

October 16, 2012
Calculator Application

ple introduced......
Aaron Brewer
November 6, 2012

You need to add a semi-colon after defining the function.
January 25, 2012
simple calculator program using javascript

simple hitcounter program in javascript