screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> </head> <body> <h3>Vue js Update the width and height of an image using input field values</h3> <div id="app"> <div> <label>Width:</label> <input type="number" v-model="imageWidth"> </div> <div> <label>Height:</label> <input type="number" v-model="imageHeight"> </div> <img :src="url" :width="imageWidth" :height="imageHeight"> </div> <script type="module"> const app = Vue.createApp({ data() { return { url: 'https://www.sarkarinaukriexams.com/images/post/1670771584desola-lanre-ologun-IgUR1iX0mqM-unsplash_(1).jpg', imageWidth: 500, imageHeight: 300, } }, }); app.mount('#app'); </script> </body> </html>