+ 4

Guy's what is wrong on my Programming?

friends the answer is coming right but it is not staying it just blink out disappears. have a look in it .and try to find out the error . https://code.sololearn.com/Wo4YUoeTe2os/?ref=app

14th Feb 2018, 2:33 PM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar
3 Réponses
+ 7
The reason is that default 'type' attribute of <button> element is 'submit'... Instead of @Blue solution, better practice is to add explicit 'type="button"' to buttons that doesn't need to submit form: <button onclick="myCal()" type="button">Press</button>
14th Feb 2018, 3:44 PM
visph
visph - avatar
+ 2
Ancient error! :D in line 14, write <form onsubmit='return false;'>
14th Feb 2018, 2:57 PM
777
777 - avatar
+ 2
thanks a lot guys, it's work amazing . actually I am not familiar with JavaScript so i am facing this type of common difficulties, by the way thanks again.
15th Feb 2018, 3:52 AM
🦋FEATHER🦋
🦋FEATHER🦋 - avatar