Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var myDiv = document.querySelector('div'),
- myInput = document.querySelector('input');
- var myTimeout;
- myInput.addEventListener('keyup', function(){
- clearTimeout(myTimeout);
- myTimeout = setTimeout(()=>{
- myDiv.textContent = this.value;
- },1000);
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement