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 decodeURIComponent() Method </h2> <p>Decode URLs in Vue.js</p> <button @click="myFunction">Click me</button> <p>Encoded Url: {{url}}</p> <p>{{result}}</p> </div> <script type="module"> import { createApp } from 'vue' createApp({ data() { return{ url:'https%3A%2F%2Ffontawesomeicons.com%2Ffa%2Fvue-js-url-encode-decode%3Fpreview%3D1', result:'', } }, methods:{ myFunction(){ this.result = 'Decoded URLs: ' + decodeURIComponent(this.url) } } }).mount('#app') </script> </body> </head> </html>