How to Create Calculator in JavaScript

How to Create Calculator in JavaScript - Hallo sahabat Another Stuff, Pada Artikel yang anda baca kali ini dengan judul How to Create Calculator in JavaScript, kami telah mempersiapkan artikel ini dengan baik untuk anda baca dan ambil informasi didalamnya. mudah-mudahan isi postingan yang kami tulis ini dapat anda pahami. baiklah, selamat membaca.

Judul : How to Create Calculator in JavaScript
link : How to Create Calculator in JavaScript

Baca juga


How to Create Calculator in JavaScript

JavaScript is vast programming language through which you can create any web application. JavaScript use in every single element on web application. Means that use of java script in web programming is necessary. Using JavaScript you make online calculator, online currency converter or anything which you want you can build in JavaScript which works online and offline on your web page. As you know calculator is a basic necessary element in our life. For example if you want to find the percentage of your income then you'll need to use calculator for calculation.
In this tutorial i am gonna show you that how to create calculator in JavaScript. You can also stylize this calculator source code by using CSS style sheet according to your requirements.

Calculator in JavaScript


how to create calculator in javascript

Calculator JavaScript Code

<h2>Calculator in Javascript</h2>
<br/>
<form Name="calculator">
<table border=2>
<tr>
<td colspan=4><input type=text Name="disp"></td>
</tr>
<tr>
<td><input type=button value="0" OnClick="calculator.disp.value+='0'"></td>
<td><input type=button value="1" OnClick="calculator.disp.value+='1'"></td>
<td><input type=button value="2" OnClick="calculator.disp.value+='2'"></td>
<td><input type=button value="+" OnClick="calculator.disp.value+='+'"></td>
</tr>
<tr>
<td><input type=button value="3" OnClick="calculator.disp.value+='3'"></td>
<td><input type=button value="4" OnClick="calculator.disp.value+='4'"></td>
<td><input type=button value="5" OnClick="calculator.disp.value+='5'"></td>
<td><input type=button value="-" OnClick="calculator.disp.value+='-'"></td>
</tr>
<tr>
<td><input type=button value="6" OnClick="calculator.disp.value+='6'"></td>
<td><input type=button value="7" OnClick="calculator.disp.value+='7'"></td>
<td><input type=button value="8" OnClick="calculator.disp.value+='8'"></td>
<td><input type=button value="x" OnClick="calculator.disp.value+='*'"></td>
</tr>
<tr>
<td><input type=button value="9" OnClick="calculator.disp.value+='9'"></td>
<td><input type=button value="C" OnClick="calculator.disp.value=''"></td>
<td><input type=button value="=" OnClick="calculator.disp.value=eval(calculator.disp.value)"></td>
<td><input type=button value="/" OnClick="calculator.disp.value+='/'"></td>
</tr>
</table>
</form>



Demikianlah Artikel How to Create Calculator in JavaScript

Sekianlah artikel How to Create Calculator in JavaScript kali ini, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sampai jumpa di postingan artikel lainnya.

Anda sekarang membaca artikel How to Create Calculator in JavaScript dengan alamat link https://anothers-stuff.blogspot.com/2016/03/how-to-create-calculator-in-javascript.html
close
==Close==