Onclick event in js | Sololearn: Learn to code for FREE!

+1

Onclick event in js

I had create a calculator. I want to use onclick event to enter number in input screen by just clicking button but I couldn't create perfect logic in function.plz help me to solve it out. https://code.sololearn.com/W8zqhePpIHw3/?ref=app

9/22/2018 1:45:55 PM

Abhishek Shailendra Khandare

7 Answers

New Answer

+2

thx estifanos tekiea

+1

use the dis function on js in this code https://code.sololearn.com/WKc1bJvyiEq1/?ref=app

+1

event listeners? ?

+1

0

it is probably better to add event listeners in your js file

0

Alternatively you could use a for loop to detect all buttons being clicked, in a few lines like so.. https://code.sololearn.com/WSEeKw3LvPWN/#html

0