VueJS参数绑定:v-bind:href,v-on:event
2021-07-10 10:05
标签:vue image script doc vuejs span round bind app 参数绑定HTML 参数绑定效果: 事件绑定HTML 事件绑定效果: VueJS参数绑定:v-bind:href,v-on:event 标签:vue image script doc vuejs span round bind app 原文地址:http://www.cnblogs.com/boonya/p/7090237.htmlDOCTYPE html>
html>
head>
meta charset="utf-8">
title>Vue 测试实例 - 菜鸟教程(runoob.com)title>
script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js">script>
head>
body>
div id="app">
pre>a v-bind:href="url">青青子衿a>pre>
div>
script>
new Vue({
el: ‘#app‘,
data: {
url: ‘http://www.boonya.com‘
}
})
script>
body>
html>
DOCTYPE html>
html>
head>
meta charset="utf-8">
title>Vue 测试实例 - 菜鸟教程(runoob.com)title>
script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js">script>
head>
body>
div id="app">
a v-on:click="doSomething">doSomethinga>
div>
script>
new Vue({
el: ‘#app‘,
data: {
doSomething:function(){
alert("Do something");
}
}
})
script>
body>
html>
上一篇:css手风琴
文章标题:VueJS参数绑定:v-bind:href,v-on:event
文章链接:http://soscw.com/essay/103184.html