Javascript Calculator

2,234 Kb

How do I make an javascript calculator?

What is a javascript calculator? How do you make a javascript calculator? This script and codes were developed by Sudipta Das on 21 January 2023, Saturday.

Javascript Calculator Previews

Javascript Calculator - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Javascript Calculator</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel='stylesheet prefetch' href=''> <link rel="stylesheet" href="css/style.css">
<form name="frm">
<table class="table table-bordered table-condensed"> <tr> <th colspan='4'><input type="text" class="form-control" name="txt" id='txt'></th> </tr> <tr> <td><input class="btn btn-primary" type="button" value="1"></td> <td><input class="btn btn-primary" type="button" value="2"></td> <td><input class="btn btn-primary" type="button" value="3"></td> <td><input class="btn btn-warning" type="button" value="+"></td> </tr> <tr> <td><input class="btn btn-primary" type="button" value="4"></td> <td><input class="btn btn-primary" type="button" value="5"></td> <td><input class="btn btn-primary" type="button" value="6"></td> <td><input class="btn btn-warning" type="button" value="-"></td> </tr><tr> <td><input class="btn btn-primary" type="button" value="7"></td> <td><input class="btn btn-primary" type="button" value="8"></td> <td><input class="btn btn-primary" type="button" value="9"></td> <td><input class="btn btn-warning" type="button" value="*"></td> <tr> <td><button class="btn btn-danger" type="button" id="ce">CE</button></td> <td><input class="btn btn-primary" type="button" value="0"></td> <td><button class="btn btn-success" type="button" id="eq">=</button></td> <td><input class="btn btn-warning" type="button" value="/"></td> </tr> </tr>
</div> <script src=''></script>
<script src=''></script> <script src="js/index.js"></script>

Javascript Calculator - Script Codes CSS Codes

font-weight: bold !important;
table{ position:absolute; width:90px !important; top:40%; left:50%; margin-left:-45px; margin-top:-45px; box-shadow: 5px 5px 10px rgba(0,0,0, .2); background-color:rgb(100,100,100); border-radius:7px;
table, tr,td,th{padding:10px !important;
.btn{width:45px;height:28px;padding:3px !important;}

Javascript Calculator - Script Codes JS Codes

 $(document).ready(function(){ try{ $('.btn').click(function(){ document.frm.txt.value+=this.value; }) $('#eq').click(function(){	document.frm.txt.value=eval(document.frm.txt.value); }) $('#ce').click(function(){ document.frm.reset(); //document.frm.txt.value=eval(document.frm.txt.value); }) } catch(err){ document.frm.txt.value="Incorrect Exception"; }
Javascript Calculator - Script Codes
Javascript Calculator - Script Codes
Home Page Home
Developer Sudipta Das
Username sdas13
Uploaded January 21, 2023
Rating 3
Size 2,234 Kb
Views 2,023
Do you need developer help for Javascript Calculator?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Sudipta Das (sdas13) Script Codes
Random Quotes
Flipkart Affiliate
CSS framework
Local Weather
Wiki Viewer 1
Wiki Viewer
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!