'how to create content/custom java script for replacing div inner html with logic

for example i have taken a Div tag; Div id = "(my_score") and inner html is 0.03 ..so i want to change this inner html 0.03 as 0.05 .

i have tried this with Document.getelementById method and got the correct result also....but the problem is after refreshing the page, the changes gone away... so how to fix it ...and what are all the parameters to be added...so that after refreshing the page the changes should remain in my browser session...pls help me answering this qustion.

thanks in advance



Solution 1:[1]

You can using localStorage to get and set value to your element. https://www.w3schools.com/jsref/prop_win_localstorage.asp Hope this will help you.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 T. Hi?u