Store condition | SoloLearn: Learn to code for FREE!

0

Store condition

I want to store a condition after I pressed a button and reset it when I press an other. Is there a way I could do this? Ps: My script updates itself every second so if i press a button it only lasts till the next second

12/25/2016 11:10:13 PM

Peter Ehlert

2 Answers

New Answer

+2

"My script updates itself every second" You mean: script reload the page every second? or just edit the dom ( html ) content? If second, global variables would be sufficient ( you can also store strings values in attributes of html elements: input are designed for that, with attribute "value" and property "hidden", but you can also do it with you own attribute on any element ) Else, look at html5 localStorage object, or cookies if you don't support html5 ( or want to be old browsers compatible )

0

Look for KeyReleaseListener