+ 1
How to use javascript to enable button when click on it?
Please check the program i have made and tell me how to do it https://code.sololearn.com/WeI2p0kyAMtq/?ref=app
10 Réponses
+ 2
Also there is nothing like mins or secs if you are talking about that error
+ 2
IMHO onClick = return false; should work 🤔
+ 1
Your button is enabled already, what you mean "enable button"?
+ 1
1. variable names at line 13 should match names at line 10, line 11
2. it is not document.body.btn, it is time, because you have getelement above
3. button text is innerText property
combining above three points, that line should be
time.innerText= hours+":"+minutes+":"+seconds;
a fix for you as demo:
https://code.sololearn.com/WSY0TTajDX5z/?ref=app
+ 1
Himanshu Shah Welcome.
Good try,
Keep up 💪
0
The problem is in the function used because button is already working.
0
i know button is working but i want make program like when i click on button through js current time display
0
Gordon thanks buddy
0
Gordon okay dost
0
Use onclick event