- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Fire a JavaScript function when a user finishes typing instead of on key up?
To fire a JavaScript function when the user finishes typing, try to run the following code −
Example
<html> <body> <script> var timer = null; $("#myText").keydown(function(){ clearTimeout(timer); timer = setTimeout(doStuff, 1000) }); function doStuff() { alert("Write more!"); } </script> <input type = "text" id = "myText" /> </body> </html>
- Related Articles
- Execute a script when a user releases a key in HTML?
- Execute a script when a user is pressing a key in HTML?
- Typing Enter/Return key in Selenium.
- JavaScript Trigger a button on ENTER key
- When does a fire brigade arrive?
- How to create a typing effect with JavaScript?
- When water is poured on a fire, which condition of combustion is not fulfilled? 55960"
- (a) What does a Fire Brigade do when it arrives at a place where a building is on fire.(b) Describe one method of putting out a fire caused by burning wood or paper.
- Which fossil fuel is conserved:(a) when we save on electricity?(b) when we use bicycle for covering short distances instead of a motorbike?
- How to uncurry a function up to depth n in JavaScript?
- How to use JavaScript to hide a DIV when the user clicks outside of it?
- How to compare two arrays when the key is a string - JavaScript
- When was fire discovered?
- JavaScript Sum function on the click of a button
- C++ map having key as a user defined data type

Advertisements