Advertisement
Guest User

Untitled

a guest
May 30th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport"
  6.           content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8.     <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  9.     <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  10.     <title>Document</title>
  11. </head>
  12. <body>
  13.     <div id="app">
  14.         <form>
  15.             <label for="name">
  16.                 Name:
  17.                 <br>
  18.                 <input type="text" id="name" v-model.lazy="name">
  19.             </label>
  20.             <br>
  21.             <label for="phone">
  22.                 Phone:
  23.                 <br>
  24.                 <input type="text" id="phone" v-model.lazy="phone">
  25.             </label>
  26.             <br>
  27.             <label for="mail">
  28.                 Phone:
  29.                 <br>
  30.                 <input type="text" id="mail" v-model.lazy="mail">
  31.             </label>
  32.  
  33.  
  34.             <br><button class="btn btn-primary" v-on:click="alertForm">Отправить</button>
  35.         </form>
  36.     </div>
  37.  
  38. </body>
  39.  
  40. <style>
  41.     body {
  42.         margin: 40px auto 0;
  43.         width: 80%;
  44.     }
  45. </style>
  46.  
  47. <script>
  48.     let app = new Vue({
  49.         el: "#app",
  50.         data: {
  51.             name: '',
  52.             phone: '',
  53.             mail: ''
  54.         },
  55.         methods: {
  56.           alertForm() {
  57.               // !this.message ? alert('Empty') : alert(this.message)
  58.  
  59.  
  60.           }
  61.         }
  62.     })
  63. </script>
  64. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement