<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>事件处理stop修饰符</title>
<style type="text/css">
div>div{
border: 1px solid black;
}
#outer{
width: 200px;
height: 200px;
background-color: #bbbbbb;
}
#inner{
width: 100px;
height: 100px;
background-color: #bc806b;
}
</style>
</head>
<body>
<div id="app">
<div id="outer" v-on:click="show('外层div被单击')">
<div id="inner" v-on:click.stop="show('内层div被单击')"></div>
</div>
</div>
<script src="../js/vue.js"></script>
<script>
let vm = new Vue({
el:'#app',
methods:{
show(message){
alert(message);
}
}
});
</script>
</body>
</html>
vue-前端第5章event08.html
原创
©著作权归作者所有:来自51CTO博客作者虾米大王的原创作品,请联系作者获取转载授权,否则将追究法律责任

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
vue-前端第5章event12.html
【代码】vue-前端第5章event12.html。
javascript css html bc -
vue-前端第5章event04.html
【代码】vue-前端第5章event04.html。
vue.js javascript 前端 html Vue -
vue-前端第5章event01.html
【代码】vue-前端第5章event01.html。
vue.js javascript 前端 html Vue -
vue-前端第5章event10.html
【代码】vue-前端第5章event10.html。
javascript css html 修饰符 -
vue-前端第5章event09.html
【代码】vue-前端第5章event09.html。
javascript html css 修饰符 -
vue-前端第5章event13.html
【代码】vue-前端第5章event13.html。
javascript css html 修饰符 提交表单 -
vue-前端第5章event07.html
【代码】vue-前端第5章event07.html。
javascript html css bc -
vue-前端第5章event00.html
【代码】vue-前端第5章event00.html。
javascript 前端 java html 事件流 -
vue-前端第5章event11.html
【代码】vue-前端第5章event11.html。
javascript html css 修饰符 -
vue-前端第5章event14.html
【代码】vue-前端第5章event14.html。
vue.js javascript 前端 html Vue -
vue-前端第5章event06.html
【代码】vue-前端第5章event06.html。
javascript vue.js 前端 html css -
vue-前端第5章event02.html
【代码】vue-前端第5章event02.html。
vue.js javascript 前端 html Vue -
vue-前端第5章event05.html
【代码】vue-前端第5章event05.html。
vue.js javascript 前端 html Vue -
vue-前端第5章event03.html
【代码】vue-前端第5章event03.html。
vue.js javascript 前端 html Vue -
vue-前端第12章transition08.html
【代码】vue-前端第12章transition08.html。
vue.js html Math css -
vue-前端第2章instance08.html
【代码】vue-前端第2章instance08.html。
javascript vue.js 前端 html ci -
vue-前端第4章class08.html
【代码】vue-前端第4章class08.html。
css html javascript vue.js -
vue-前端第9章component08.html
【代码】vue-前端第9章component08.html。
vue.js javascript 前端 html Vue -
vue-前端第6章form08.html
【代码】vue-前端第6章form08.html。
javascript 前端 vue.js html python