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"> <h3>Vue Js setInterval Method</h3> <p>Use of setInterval in Vue Js</p> <p>{{message}}</p> </div> <script type="module"> import { createApp } from "vue"; createApp({ data() { return { message: '', } }, mounted() { setInterval(() => { return this.message = new Date().toLocaleTimeString(); }, 5000) }, }).mount("#app"); </script> </body> </head> </html>