Skip to content

Latest commit

 

History

History
86 lines (86 loc) · 3.05 KB

README.md

File metadata and controls

86 lines (86 loc) · 3.05 KB

#First Github Repo

calculator using javascript

<title>Calculator</title> <style> h1{ text-align: center; } button{ height: 40px; width: 40px; } #main{ height: 40px; width: 200px; } #res{ background-color: rgb(0, 110, 255); color: white; } </style> <script> function input(a){ var y = document.getElementById("main").value+a; document.getElementById("main").value=y; } function result(a){ var c= document.getElementById("main").value; document.getElementById("main").value = eval(c); } function clear1(){ var x = document.getElementById("main").value x = x.slice(0,-1) document.getElementById("main").value = x } function clear2(){ document.getElementById("main").value = " "; } </script>

CALCULATOR

% ^ C AC 7 8 9 x 6 5 4 - 1 2 3 + 0 . / =