Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what errors are in the following javascript? document.getElementById ( button 0 ) . onclick = function ( ) { runCalculator ( 0 )

what errors are in the following javascript? document.getElementById("button0").onclick = function(){
runCalculator(0);
}
document.getElementById("button1").onclick = function(){
runCalculator(1);
}
document.getElementById("button2").onclick = function(){
runCalculator(2);
}
document.getElementById("button3").onclick = function(){
runCalculator(3);
}
document.getElementById("button4").onclick = function(){
runCalculator(4);
}
document.getElementById("button5").onclick = function(){
runCalculator(5);
}
document.getElementById("button6").onclick = function(){
runCalculator(6);
}
document.getElementById("button7").onclick = function(){
runCalculator(7);
}
document.getElementById("button8").onclick = function(){
runCalculator(8);
}
document.getElementById("button9").onclick = function(){
runCalculator(9);
}
document.getElementById("buttonAdd").onclick = function(){
runCalculator("+");
}
document.getElementById("buttonMinus").onclick = function(){
runCalculator("-");
}
document.getElementById("buttonMultiply").onclick = function(){
runCalculator("*");
}
document.getElementById("buttonDivide").onclick = function(){
runCalculator("/");
}
document.getElementById("buttonDecimal").onclick = function(){
runCalculator(".");
}
// Send an empty text string if the Enter key is clicked
document.getElementById("buttonEnter").onclick = function(){
runCalculator("");
}
// Clear the calculator window if the C key is clicked
document.getElementById("buttonClear").onclick = clearCalculator;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part I Lnai 8724

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448475, 978-3662448472

More Books

Students also viewed these Databases questions

Question

What is electric dipole explain with example

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago

Question

Create a workflow analysis.

Answered: 1 week ago