Categories
Vue Answers

How to use onfocusout function in Vue.js?

Spread the love

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.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *