I am trying to open an HTML file with a button. Here is my code:
<!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>
The error that showed up was:
11
index.html:21 Uncaught TypeError: Window.open is not a function
at HTMLButtonElement.onclick (index.html:21:103)
I've tried to search for any other mention of Window.open() but the button was the only reference.
It's window.open(), with no capital W.