Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add keyup event javascript

// Assume the input element has an id of search
// <input type="text" id="search" />
const search = document.getElementById("search");

search.addEventListener("keyup", function (e) {
  const inputText = e.target.value; // Get the text typed by user
  console.log(inputText); // log the input text out
});
 
PREVIOUS NEXT
Tagged: #add #keyup #event #javascript
ADD COMMENT
Topic
Name
5+7 =