Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,655 members, 7,813,211 topics. Date: Tuesday, 30 April 2024 at 08:44 AM

Javascript - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Javascript (839 Views)

The Javascript Thread / Challenge For Javascript Beginners/intermidiate / After 10days Of Coding With Html, Css And Javascript Forum4africa Is Ready (2) (3) (4)

(1) (Reply) (Go Down)

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:
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.

1 Like

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(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:
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(m): 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)

Benefits Of Choosing A Local Web Design Agency In Dubai / Remote Worker? Please Open This Thread / C++ Compiler, Anybody, Plz Help Me

(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. 16
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.