Make a calculator from javascript. the HTML code is presented below. 1 2 3 + 4 5 6 - 7 8 9 * C 0 = ÷
Make a calculator from javascript. the HTML code is presented below.
<html> <head> <style> button { font-size: 200%; width: 40px; } input { font-size: 14px; height: 40px; text-align: right; } </style> </head> <body> <table> <tr> <td colspan="4"><input id="display" name="display" disabled></input></td> </tr> <tr> <td><button id="button1" value="1">1</button></td> <td><button id="button2" value="2">2</button></td> <td><button id="button3" value="3">3</button></td> <td><button id="addButton">+</button></td> </tr> <tr> <td><button id="button4" value="4">4</button></td> <td><button id="button5" value="5">5</button></td> <td><button id="button6" value="6">6</button></td> <td><button id="subtractButton">-</button></td> </tr> <tr> <td><button id="button7" value="7">7</button></td> <td><button id="button8" value="8">8</button></td> <td><button id="button9" value="9">9</button></td> <td><button id="multiplyButton">*</button></td> </tr> <tr> <td><button id="clearButton">C</button></td> <td><button id="button0" value="0">0</button></td> <td><button id="equalsButton">=</button></td> <td><button id="divideButton">÷</button></td> </tr> </table> <span id='output'><!-- Use this span for writing debug messages or anything else you think will help! --></span> <script src="calc.js"></script> </body> </html>
![Use the JavaScript Selectors to select HTML elements and modify their
contents
• Define callback functions that are invoked as the result of user actions
in the HTML page
• Assemble a JavaScript application consisting of multiple functions](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb3b163a2-186d-4b18-b301-cf1572cde5b7%2Fa88fe7fa-d076-4061-bc0b-7997114a3fb7%2Fz84zozv_processed.png&w=3840&q=75)
![O calc.html
Guest
C D file:///calc.html
1 23 +
4 5 6
7 8 9 *
CO =](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb3b163a2-186d-4b18-b301-cf1572cde5b7%2Fa88fe7fa-d076-4061-bc0b-7997114a3fb7%2Fa9foz2a_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 6 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)