I have set the number X to 5.
When clicking a button a script is run to update the database without refreshing – that works fine.
Now i want a number on the page to update to 6, also without the page refreshing.
I tried JS, but ended up having the number in an input field which looks bad. Is there any other way, maybe with jQuery.
I have set the number X to 5. When clicking a button a script
Share
You don’t have to use jQuery.
You can update everything on page by pure JavaScript, without jQuery.
Example from Javascript Tutorial at tizag.com: