Sometimes, we want to use onfocusout function in Vue.js.
In this article, we’ll look at how to use onfocusout function in Vue.js.
How to use onfocusout function in Vue.js?
To use onfocusout function in Vue.js, we listen for the blur event.
For instance, we write
<template>
<input @blur="handleBlur" />
</template>
to set the handleBlur
method as the blur event handler function.
handleBlur
is called when we move focus away from the input.
Conclusion
To use onfocusout function in Vue.js, we listen for the blur event.