Reputation: 135
I am trying to make a button to open a page when clicked using window.open, but it doesn't do anything
<input type = "button" value="Two Players" onClick = "window.open(Two.html);">
Upvotes: 0
Views: 90
Reputation: 93521
<input type = "button" value="Two Players" onclick = "window.open('Two.html');">
and not
<input type = "button" value="Two Players" onclick = "window.open(Two.html);">
Dont' forget the two : ''
for your path Two.html
FIDDLE: http://jsfiddle.net/abdennour/XqsC5/
Upvotes: 7