interfaces/topic_result/index.html

34 lines
626 B
HTML
Raw Normal View History

2023-04-09 19:13:53 +00:00
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Калькулятор путешествий</title>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="app">
<input v-model="a"></br>
<input v-model="b"></br>
<p>Итого: {{ result }}</p>
</div>
<script>
Vue.createApp({
data() {
return {
a: 0,
b: 0,
}
},
computed: {
result() {
return this.a * this.b
}
}
}).mount('#app')
</script>
</body>
</html>