Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,197,378 members, 7,964,539 topics. Date: Wednesday, 02 October 2024 at 03:33 PM |
Nairaland Forum / Science/Technology / Programming / Javascript (861 Views)
The Javascript Thread / Challenge For Javascript Beginners/intermidiate / After 10days Of Coding With Html, Css And Javascript Forum4africa Is Ready (2) (3) (4)
Javascript by manando1(m): 6:53pm On Jan 14, 2021 |
Hi can someone please help me with JavaScript that do the following , For Example: If User clicked the button one time, the value should increase from 0 to 1 and then if clicked again, then the value should be 1 to 2. And the greatest amount of numbers be placed on top of the table automatically . My current code isn't functioning accordingly Thanks |
Re: Javascript by eddybrigs: 7:41pm On Jan 14, 2021 |
You tube |
Re: Javascript by Karleb(m): 7:47pm On Jan 14, 2021 |
manando1: This is actually a very simple thing to do. Post your code. |
Re: Javascript by JFOD: 8:35am On Jan 16, 2021 |
manando1: I can really explain well due to my little knowledge on the subject matter. Create a function that increments a counter whenever it's called and couple it with the onclick stuff. Is the table on the webpage? If yes, you can look up how to display variables on web pages (template engines (ejs and co I think). There might be a simple/other way to go about this. 1 Like |
Re: Javascript by Brukx(m): 4:19pm On Jan 16, 2021 |
manando1: What's the output your code gives? Check if you are doing the type conversations properly. I don't understand the table aspect by check the script below
|
Re: Javascript by manando1(m): 9:43am On Jan 18, 2021 |
Thanks for your response , I was able to code , but now my code when the browser refresh it starts from 0 how can I store the data |
Re: Javascript by cixak95211: 10:27am On Jan 18, 2021 |
manando1: localStorage p.s. it can only store strings for each key => value pair. So dont forget to JSON stringify and JSON. parse when storing and retreiving or better still use serialization which is better and more performant than JSON strin/parse Goodluck |
Re: Javascript by manando1(m): 12:00pm On Jan 18, 2021 |
cixak95211:Thanks |
Re: Javascript by glaber: 10:37am On Jan 21, 2021 |
cixak95211:Exactly |
(1) (Reply)
What You Need To Know About Nfts As A Nigerian. / Full-time Job Vacancies For Developers In A Tech Company In Ibadan, Apply Now / Nairaland Login Function Is Faulty!
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 13 |