daily pastebin goal
78%
SHARE
TWEET

Untitled

a guest Nov 8th, 2018 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(document).ready(function(){
  2.  
  3.      var cout = localStorage.getItem('cout') || 0;
  4.  
  5.         $("#btnCount").click(function(){
  6.             cout = parseInt(cout)+1;
  7.             $('p').html(cout);
  8.             alert(cout);
  9.             localStorage.setItem('cout',cout);
  10.         });        
  11. });    
  12. </script>
  13. <button type="button" id="btnCount">Click me</button>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top