dj0965
dj0965

Reputation: 135

Javascript window.open not doing anything

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

Answers (1)

Abdennour TOUMI
Abdennour TOUMI

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

Related Questions