v-model --双向数据绑定


<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>Documenttitle>
head>

<body>

    <div id="app">
        <h1>{{greeting}}h1>
        <input type="text" v-model="greeting">
    div>


    <script src="./vue.js">script>
    <script>

       
        const app = new Vue({
            el: '#app',
            data: {
                greeting: 'Hello Vuejs'
            }
        });



    script>
body>

html>

你可能感兴趣的:(Vue)