1234567891011121314151617181920212223242526 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>example</title>
- <script src="./mvvm.js" charset="utf-8"></script>
- </head>
- <body>
- <div id="mvvm">
- <h2>{{name}}</h2>
- <input type="text" x-model="name">
- <h3>{{val}}</h3>
- </div>
- </body>
- <script>
- const myvue = new MyVue({
- el: '#mvvm',
- data: {
- name: '123',
- val: 222,
- },
- });
- </script>
- </html>
|