screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html lang="en"> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h3>Vue Js Open link in Window (not Tab)</h3> <button @click="openLink">Open Link</button> </div> <script type="module"> const app = new Vue({ el: "#app", methods: { openLink() { const newWindow = window.open('https://fontawesomeicons.com', '_blank', 'width=500,height=500'); if (newWindow) { newWindow.focus(); } } } }); </script> <style scoped> #app { text-align: center; margin-top: 50px; } button { padding: 10px 20px; font-size: 16px; background-color: #4CAF50; color: white; border: none; cursor: pointer; } button:hover { background-color: #45a049; } h3 { font-size: 20px; margin-bottom: 20px; } </style> </body> </html>