Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue.js function to always uppercase when the client input lowercase

<div id="app">	
	<p>{{myStr}}</p>
	<p>{{myStr2}}</p>
	<button @click="myFunction()">Click Me</button>
</div>
<script>
 new Vue({
el: '#app',
  
  data: { 
	  myStr:"Hello World!",
	  myStr2:""
  },
  
   methods:{
    myFunction: function () {	
		this.myStr2 = this.myStr.toUpperCase();
    }
   }

});
</script>
Source by www.tutorialsplane.com #
 
PREVIOUS NEXT
Tagged: #function #uppercase #client #input #lowercase
ADD COMMENT
Topic
Name
7+1 =