1<template>
2 <div id="example">
3 <button v-on:click="greet">Greet</button>
4 </div>
5</template>
6
7<script>
8export default {
9 methods: {
10 greet: function(event) {
11 // `event` is the native DOM event
12 alert(event.target.tagName);
13 }
14 }
15};
16</script>