screen_rotation
Copied to Clipboard
<html> <head> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> <h3>Vue Js Open URL As Modal Popup With Overlay</h3> <button class="btnew" type="button" @click="openModal"> Open Modal </button> </div> <script type="module"> const app = new Vue({ el: "#app", methods: { openModal() { const myURL = 'https://fontawesomeicons.com/'; const title = 'web'; const myWidth = 1200; const myHeight = 900; const left = (screen.width - myWidth) / 2; const top = (screen.height - myHeight) / 4; const myWindow = window.open( myURL, title, `toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=${myWidth}, height=${myHeight}, top=${top}, left=${left}` ); }, }, }); </script> <style> h3 { font-size: 24px; margin-bottom: 20px; } .btnew { padding: 10px 20px; background-color: #4CAF50; color: white; border: none; border-radius: 4px; cursor: pointer; } .btnew:hover { background-color: #45a049; } </style> </body> </html>