Answers for "javascript event for enter value for invoice"

3

how to check if enter is pressed javascript

$('#usersearch').keydown(function(e){
    if(e.keyCode === 13){
            alert("Enter was pressed ");
     }  
});
Posted by: Guest on September-14-2020
0

Capturing enter in javascript

//You can use onKeyPress directly on input field. onChange function changes 
//state value on every input field change and after Enter
//is pressed it will call a function search().

<input
    type="text"
    placeholder="Search..."
    onChange={event => {this.setState({query: event.target.value})}}
    onKeyPress={event => {
                if (event.key === 'Enter') {
                  this.search()
                }
              }}
/>
Posted by: Guest on July-10-2021

Code answers related to "javascript event for enter value for invoice"

Code answers related to "Javascript"

Browse Popular Code Answers by Language