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 navigator.onLine Property</h3> <p>Check whether the browser is online or offline.in Vue Js</p> <p v-if="checkConnection">You are online</p> <p v-else>You are offline</p> </div> <script type="module"> import { createApp } from "vue"; createApp({ data() { return { checkConnection: navigator.onLine, }; }, }).mount("#app"); </script> </body> </head> </html>