Khandaker Toihidul Islam
Software Engineer
Backend : PHP | Mysql | Symfony | CakePhp | Wordpress | Drupal
Frontend : Node js | Vue js | React Js | Javascript | HTML | CSS | Bootstrap
Tools , Server : Nginx | Apache | Git | Jenkins | Jira | Asana | Silenium | Spira

Vue js simple methods for input

HTML

<script src="https://unpkg.com/vue@2.6.11/dist/vue.js"></script>
	<div id="app">
		<input type="text" name="name" v-on:input="changeTitle" placeholder="Enter your name">
		<p> {{ title }}</p>
	</div>

JS

<script type="text/javascript">
	new Vue({
		el: "#app",
		data: {
			title : "Hello World"
		},
		methods : {
			changeTitle: function(event){
				this.title = event.target.value;
			}
		}
	});
</script>

Output and Demo http://vue.toihid.com/section-1/4_extending_vuejs.php

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *