Skip to content

Instantly share code, notes, and snippets.

@nisabengisu
Created October 14, 2019 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nisabengisu/041b2bfda2d2960026010bad7f6c4ceb to your computer and use it in GitHub Desktop.
Save nisabengisu/041b2bfda2d2960026010bad7f6c4ceb to your computer and use it in GitHub Desktop.
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