33 lines
654 B
HTML
33 lines
654 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>Hello Vue</title>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="app">
|
|
{{ message }}
|
|
<button @click="changeMessage">Change the message!</button>
|
|
</div>
|
|
|
|
<script>
|
|
new Vue({
|
|
el: "#app",
|
|
data: {
|
|
message: "Hello Vue!",
|
|
},
|
|
methods: {
|
|
changeMessage() {
|
|
this.message = "Hello World!";
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|