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.fromcharCode() Method </h2> <p>Get character string by user input, Unicode covert into string character in Vue Js</p> <input type="text" @input="myFunction" maxlength ='3' v-model="numerical"/> <p>Character ASCII code: {{results}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ results : '', numerical:'' } }, methods:{ myFunction(){ this.results = String.fromCharCode(this.numerical); }, } }).mount('#app') </script> </body> </head> </html>