Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

Pure JavaScript Simple Calculator Tutorial

Pure JavaScript Simple Calculator Tutorial

In this tutorial we are going to learn pure  JavaScript simple Calculator Application through input text box, complete code is given below and code is easy to understand, still, if you find any kind of difficulty then please comment, I will try to clear you …

JavaScript Simple Calculator Complete Code :

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>JavaScript Calculator</title>
<input type="text" id="num1" placeholder="Enter Number">
<input type="text" id="num2" placeholder="Enter Number">
<select id="sel">
<option value="">Select</option>
<option value="division">division</option>
<option value="substract">substract</option>
<option value="addition">addition</option>
<option value="multiply">multiply</option>
<input type="submit" onclick="addition()" value="submit">
<div id="result"></div>
function addition(){
var num1= parseFloat(document.getElementById("num1").value);
var num2= parseFloat(document.getElementById("num2").value);
var sel=document.getElementById("sel").value;
var result;
}else if(sel=='substract'){
}else if(sel=='division'){

JavaScript Simple Calculator Demo :


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Do you have any Query / Suggestion