vue.js代码002

时间:2023-02-25 11:59:15


t002.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>t002</title>
<script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<div class="root">
<h1>Hello,{{name}}</h1>
</div>

<div class="root">
<h2>good,{{name}}</h2>
</div>

<script type="text/javascript">
Vue.config.productionTip = false

new Vue({
el:'.root',
data:{
name:'虾米'
}
})

</script>
</body>
</html>