vue事件简写方式
<!DOCTYPE html><html><head><meta charset="utf-8"><title></title><script src="../js/Vue.js" charset="utf-8"></script><script type="text/javascript">window.onload = functio
·
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="../js/Vue.js" charset="utf-8"></script>
<script type="text/javascript">
window.onload = function(){
var vm = new Vue({
el:'#box',
data:{},
methods:{
show:function(){
alert(111)
}
}
});
}
</script>
</head>
<body>
<div id="box">
<input type="button" name="" value="按钮" @click="show()">
</div>
</body>
</html>
更多推荐
已为社区贡献6条内容
所有评论(0)