screen_rotation
Copied to Clipboard
<html> <head> <script type="importmap"> { "imports": { "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js" } } </script> <body> <div id="app"> <h2>Vue js string.charCodeAt() Method </h2> <p>Get character code by user input, String character covert into Unicode in Vue Js</p> <input type="text" @input="myFunction" maxlength ='1' v-model="character"/> <p>Character ASCII code: {{results}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ results : '', character:'' } }, methods:{ myFunction(){ this.results = this.character.charCodeAt(); }, } }).mount('#app') </script> </body> </head> </html>