0
I’m trying to implement this function:
function aumentarFont() {
document.getElementById("myP").style.fontSize = "medium";
}
Executes the action:
<a href="#" type="text" onclick="aumentarFont()">A+</a>
Apparently it is working correctly, but when I refresh the page the font returns to its normal size. How do I keep this function running after refresh?
You will have to save the size of this font somewhere (in the server - database, or in the client -
localStorage
, etc.) and work in a way of "set" this setting every time you load the page.– Jéf Bueno
how about using Session
– user60252