jeudi 24 novembre 2016

How to save html data local

How can I save my HTML element tag data after user closed the browser. For example

<div class="classOne" data-random="50">

And i used jQuery to change the data attribute

$(".classOne").attr("data-random","40")

And if the user close out the browser and comes back the value for data-random will be 40. How can I achieve this ?




Aucun commentaire:

Enregistrer un commentaire