Make a calculator from  javascript. the HTML code is presented below. 1 2 3 + 4 5 6 - 7 8 9 * C 0 = ÷

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter6: Creating, Sorting, And Querying A Table
Section: Chapter Questions
Problem 5EYW
icon
Related questions
Question

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">&#247;</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
Transcribed Image Text: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
O calc.html
Guest
C D file:///calc.html
1 23 +
4 5 6
7 8 9 *
CO =
Transcribed Image Text:O calc.html Guest C D file:///calc.html 1 23 + 4 5 6 7 8 9 * CO =
Expert Solution
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
Features of HTML
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning