This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/2021-01-18 basics-03-events.../index.html

30 lines
1019 B
HTML
Raw Permalink Normal View History

2021-01-18 17:17:34 +01:00
<!DOCTYPE html>
<html lang="en">
2021-01-18 17:40:53 +01:00
<head>
2021-01-18 17:17:34 +01:00
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue Basics</title>
2021-01-18 17:40:53 +01:00
<link href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap" rel="stylesheet" />
2021-01-18 17:17:34 +01:00
<link rel="stylesheet" href="styles.css" />
<script src="https://unpkg.com/vue@next" defer></script>
<script src="app.js" defer></script>
2021-01-18 17:40:53 +01:00
</head>
<body>
2021-01-18 17:17:34 +01:00
<header>
2021-01-18 17:40:53 +01:00
<h1>Vue Events</h1>
2021-01-18 17:17:34 +01:00
</header>
<section id="events">
2021-01-18 17:40:53 +01:00
<h2>Events in Action</h2>
2021-01-18 18:06:05 +01:00
<button v-on:click="increaseCounter(10)">Add 10</button>
<button v-on:click="decreaseCounter(5)">Reduce 5</button>
2021-01-18 17:40:53 +01:00
<p>Result: {{ counter }}</p>
2021-01-18 18:23:34 +01:00
<input type="text" v-on:input="setName($event, 'SomeOtherINput')" v-on:keyup.enter="confirmName" />
<p>Your Name: {{ confirmedName }}</p>
<form v-on:submit.prevent="submitForm"><input type="text"><button>Sign Up</button></form>
2021-01-18 17:17:34 +01:00
</section>
2021-01-18 17:40:53 +01:00
</body>
2021-01-18 17:17:34 +01:00
</html>