Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type='text' name='text1' onkeyup='exec(this.value);'/>
- <script>
- exec = function(textdata) { alert(textdata); }
- </script>
- <input type='text' name='text1' onkeyup='exec(this.value);'/>
- <script>
- var timer; //This needs to be a global variable
- exec = function(textData){
- clearTimeout(timer);
- timer = setTimeout(function(){ alert(textData) }, 2000);
- }
- </script>
Add Comment
Please, Sign In to add comment