How can I do this? I basically want to call a function where I get the info from the textbox once the user is done entering info. Ie, after they click off of the text box. I couldn't find the clear way to do this. Is there an API for event/actions and what you can do on each input?
Try the blur
event:
yourTextBox.onblur = function() {
console.log(yourTextBox.value);
};
or
yourTextBox.addEventListener('blur', function() {
console.log(yourTextBox.value);
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.