+ 1

I have problem with my project on sololearn

I made calculator and input that shows the numbers calls itself that it has null value and I don't know why

13th Nov 2019, 5:25 PM
Patrick Daniel Parafińczuk
Patrick Daniel Parafińczuk - avatar
4 odpowiedzi
+ 1
Brother please post your code also. It will get easy to find mistake and correct it.
13th Nov 2019, 5:27 PM
Nitin Tiwari
Nitin Tiwari - avatar
+ 1
var number_box = document.getElementById("number_box"); var buttons = document.getElementsByClassName("buttons"); var memory = ''; function plus() { number_box.value += "+"; } function one() { number_box.value += 1; }
13th Nov 2019, 5:35 PM
Patrick Daniel Parafińczuk
Patrick Daniel Parafińczuk - avatar
0
<!DOCTYPE html> <html> <head> <title>Calculator</title> </head> <body> <div id = "container"> <input type="number" id="number_box" disabled placeholder="1" name = "number_box"/> <br /> <div id = "buttons-container"> <button class = "buttons" id = "parentheses" onclick="parentheses()">( )</button> <button class = "buttons" id = "power" onclick="power()">x<sup>2</sup></button> <button class = "buttons" id = "sqrt">sqrt</button> <button class = "buttons" id = "divide">/</button> <br /> <button class = "buttons" id = "seven">7</button> <button class = "buttons" id = "eight">8</button> <button class = "buttons" id = "nine">9</button> <button class = "buttons" id = "modulo">%</button> <br /> <button class = "buttons" id = "four">4</button> <button class = "buttons" id = "
13th Nov 2019, 5:35 PM
Patrick Daniel Parafińczuk
Patrick Daniel Parafińczuk - avatar