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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education