Estoy tratando de abrir un archivo HTML con un botón. Aquí está mi código:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styleset.css"> <link rel="icon" type="image/x-icon" href="favicon.ico"> <title>example</title> </head> <body> <header> <div class="selectoff head"> <img src="example.png" alt="Favicon/Logo" id="imgh"> <h1 id="h1h">example</h1> </div> </header> <br> <div class="center lhalf selectoff"> <br> <h1>example</h2> <button type="button" id="example" onclick="Window.open('list.html','_blank')">c\Lorem ipsum dolor sit amet</button> </div> </body> </html>El error que apareció fue:
11 index.html:21 Uncaught TypeError: Window.open is not a function at HTMLButtonElement.onclick (index.html:21:103) Intenté buscar cualquier otra mención de Window.open() pero el botón era la única referencia.
Es window.open() , sin W mayúscula.