Method
<style> | |
.button { | |
color:rgb(4, 26, 9) !important; | |
border-color: rgb(122, 153, 119) !important; | |
} | |
.button:hover{ | |
color: rgb(87, 129, 83) !important; | |
} | |
.button:active{ | |
color: #000 !important; | |
} | |
</style> | |
<script src="https://unpkg.com/vue/dist/vue.js"></script> | |
<div id="app-2"> | |
<p>{{ message }}</p> | |
<button class="button" v-on:click="reverseMessage">Ters Çevir</button> | |
</div> | |
<script> | |
var app5 = new Vue({ | |
el: '#app-2', | |
data: { | |
message: 'Bilgisayar Mühendisi' | |
}, | |
methods: { | |
reverseMessage: function () { | |
this.message = this.message.split('').reverse().join('') | |
} | |
} | |
}) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment