Vue的学习
v-html的使用
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <script> window.onload = function () { new Vue({ el: '#root', data: { xinxi: '<h1>我的同学</h1>' } }) } </script> </head> <body> <div id="root"> <div v-html="xinxi"></div> </div> </body> </html>