Facebook
From roooomaaaaan, 6 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 75
  1. <!DOCTYPE html>
  2. <html lang="pl">
  3. <head>
  4.     <meta charset="utf-8" />
  5.     <title>Obiekt Window</title>
  6.     <meta name="viewport" content="width=device-width, initial-scale=1">
  7.     <link rel="stylesheet" type="text/css" media="screen" href="main.css" />
  8.     <script src="main.js"></script>
  9. </head>
  10. <body>
  11.   <input type="button" value="Otw√≥rz nowe okno" id="guzikOkna" />
  12.   <script>
  13.     function myWindow(url)
  14.     {
  15.     const newWindow = window.open(url, 'tytul-okna', 'toolbar=1,menubar=1,scrollbars=1,resizable=1,status=0,location=0,directories=0,top=20,left=20,height=500,width=700');
  16.     }
  17.     document.getElementById('guzikOkna').addEventListener('click', function()
  18.     {
  19.     myWindow('http://onet.pl')
  20.     });
  21.   </script>  
  22.    
  23. </body>
  24. </html>