vue button prevent default code example
Example 1: vuejs form prevent default event
<form
action="/"
v-on:submit.prevent="yourFunction"
>
...
</form>
Example 2: vue js button click
<div id="example-2">
<!-- `greet` is the name of a method defined below -->
<button v-on:click="greet">Greet</button>
</div>