2π
This is the fixed script for you. As a general advice, in future try to read your console and thus figure out the origin of mistake. The problems were that you reference vue not the way you should, and secondly you reference the app element in a wrong way
let myApp = new Vue({
el:'#myApp',
data:{
myGame:'θΆ
η΄ι¦¬εζ'
},
methods:{
btnClick: function(pname){
this.myGame = pname;
},
},
});
<div id="myApp" >
<p> ζ¨ζεζ‘ηιζ²ζ―οΌ{{myGame}}</p>
<button v-on:click="btnClick('ζηδΈη')">ζηδΈη</button>
<button v-on:click="btnClick('ζηδΈη33')">ζηδΈη33</button>
<button v-on:click="btnClick('ζηδΈη44')">ζηδΈη44</button>
<button @click="btnClick('ζηδΈ11η')">ζηδΈ11η</button>
</div>
<script src="https://unpkg.com/vue@2.5.16/dist/vue.js"></script>
π€seethrough
Source:stackexchange.com