+ 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

10th Aug 2020, 10:56 AM
Himanshu Shah
Himanshu Shah - avatar
10 Respostas
+ 2
Also there is nothing like mins or secs if you are talking about that error
10th Aug 2020, 11:14 AM
Abhay
Abhay - avatar
+ 2
IMHO onClick = return false; should work 🤔
11th Aug 2020, 5:02 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 1
Your button is enabled already, what you mean "enable button"?
10th Aug 2020, 11:07 AM
Ipang
+ 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
10th Aug 2020, 11:16 AM
Gordon
Gordon - avatar
+ 1
Himanshu Shah Welcome. Good try, Keep up 💪
10th Aug 2020, 11:25 AM
Gordon
Gordon - avatar
0
The problem is in the function used because button is already working.
10th Aug 2020, 11:13 AM
shubham kumar
shubham kumar - avatar
0
i know button is working but i want make program like when i click on button through js current time display
10th Aug 2020, 11:24 AM
Himanshu Shah
Himanshu Shah - avatar
0
Gordon thanks buddy
10th Aug 2020, 11:24 AM
Himanshu Shah
Himanshu Shah - avatar
0
Gordon okay dost
10th Aug 2020, 11:31 AM
Himanshu Shah
Himanshu Shah - avatar
0
Use onclick event
14th Nov 2020, 12:07 AM
Anuoluwapo Hammed
Anuoluwapo Hammed - avatar