Issue
when I press a try it button at the bottom of my page, it reloads the page and deselects all checkboxes. THe main problem i have with this is that when i select a box and click total, the total will be displayed for a split second, before the page reloads back to a state of nothing being checked. enter image description here
Solution
If you don't want to have the page reloaded, you can use event.preventDefault();. when you use the event prevent function, this function blocks reloading the page when clicking/pressing the "try it" button.
Answered By - Mofazzal Hossain
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.