daily pastebin goal
79%
SHARE
TWEET

Untitled

a guest Feb 12th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <input type='text' name='text1' onkeyup='exec(this.value);'/>
  2. <script>
  3. exec = function(textdata) { alert(textdata); }
  4. </script>
  5.    
  6. <input type='text' name='text1' onkeyup='exec(this.value);'/>
  7. <script>
  8.  
  9. var timer; //This needs to be a global variable
  10.  
  11. exec = function(textData){
  12.  
  13.   clearTimeout(timer);
  14.  
  15.   timer = setTimeout(function(){ alert(textData) }, 2000);  
  16. }
  17. </script>
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