代码
提交代码
<!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>Document</title> </head> <body> <div id="app"> <div v-bind:title="title"> 鼠标悬停查看消息! </div> <div> <a v-bind:href="href">慕课网</a> </div> <div> <img v-bind:src="src"/> </div> <div> <button v-bind:disabled="disabled">禁用按钮</button> </div> </div> </body> <script src="https://unpkg.com/vue/dist/vue.js"></script> <script type="text/javascript"> var vm = new Vue({ el: '#app', data: { title: "您好,我是小慕,欢迎来到慕课网!希望你可以在慕课网学到更多的东西!", href: 'https://www.imooc.com/', src: 'http://img2.mukewang.com/szimg/5df1deec09ba554712000676-360-202.png', disabled: true } }) </script> </html>
运行结果