Display alert only once

后端 未结 3 1494
说谎
说谎 2020-12-16 05:14

I have this code that shows alert when it\'s 30 minutes before event in calendar but I want to show it only once when user comes to page (in that 30min). Now it shows on eve

3条回答
  •  长情又很酷
    2020-12-16 05:49

    You have to use cookies or localStorage or sessionStorage to do this!

    See the following link on localStorage: http://www.w3schools.com/html/html5_webstorage.asp

    or

    http://www.webdesignerdepot.com/2013/04/how-to-use-local-storage-for-javascript/

提交回复
热议问题