Use Browser As Calculator

Posted by Jacob koshy On April 27, 2012 2 comments
Use Browser As Calculator

What would you do if you have to calculate some figure when browsing through the web?
Probably you will minimize the browser and open calculator in a new window.Why to do all these when you can do simple calculations easily in the browser itself?.

This is done by simple javascript code, which most of the web browsers support.You can even use mobile web browsers for this.

How to:

There is a code for the calculation.You need to type the code in the address bar and press enter. The answer would be displayed immediately in a popup dialog box.

Here is the code..

javascript:
alert(calculation part);


If you want to
calculate 6+5, the code will be

javascript:alert(6+5);

Just type it in the address bar and press 'enter'.

The below screenshot shows how the answer is displayed in a browser.

Browser Calculator


To calculate 6*5-2 ,type

javascript:alert(6*5-2);
in the address bar and press enter.You can use +, -, *, /, %
and perform calculations very easily without opening the Windows calculator. It may sound uneasy at first,but it works like a charm.
Just try it a couple of times and you will get used to it.

You can also use Google for calculation by simply typing the problem on search box. Just type 6+5 on google.
Cheers!

2 comments:

John said...

Nice trick. But if you just search it, Google does the JavaScript part for you :)

Jacob koshy said...

yea, you are right john, google search is an option too..thanx for commenting..

Post a Comment

Please do not spam! Spam comments will be deleted immediately upon our review.