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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue Basics</title>
<link href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="styles.css" />
<script src="https://unpkg.com/vue@next" defer></script>
<script src="app.js" defer></script>
</head>
<body>
<header>
<h1>Vue Events</h1>
</header>
<section id="events">
<h2>Events in Action</h2>
<button v-on:click="increaseCounter(10)">Add 10</button>
<button v-on:click="decreaseCounter(5)">Reduce 5</button>
<p>Result: {{ counter }}</p>
<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>
</section>
</body>
</html>