₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,113 members, 8,420,423 topics. Date: Thursday, 04 June 2026 at 07:11 PM

Toggle theme

Javascript - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingJavascript (940 Views)

1 Reply (Go Down)

Javascript by manando1(op): 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:
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
This is actually a very simple thing to do.

Post your code.
Re: Javascript by JFOD: 8:35am On Jan 16, 2021
manando1:
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
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.
Re: Javascript by Brukx(m): 4:19pm On Jan 16, 2021
manando1:
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
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(op): 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:
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
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(op): 12:00pm On Jan 18, 2021
cixak95211:
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
Thanks
Re: Javascript by glaber: 10:37am On Jan 21, 2021
cixak95211:
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
Exactly
1 Reply

Mobile Technology: Lets Build A Mobile App With JavascriptFree HTML5, CSS3 And Basic Javascript (jquery) TrainingLets Learn React Native,javascript,react Js And Node Js Together(alimosho LGA)234

My First Web Dev Interview. Pls Advise MeBits Masking In Public Key EncryptionMigrating Java To . Net