screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h2>Vue Get Current Date and Time </h2> <p>Current date and time: {{ currentDateTime }}</p> </div> <script type="module"> const app = new Vue({ el: "#app", data() { return { currentDateTime: '' } }, mounted() { const currentDate = new Date(); this.currentDateTime = currentDate.toLocaleString(); } }); </script> </body> </html>