Javascript window.open没有做任何事情

时间:2014-05-10 03:01:20

标签: javascript html

我正在尝试使用window.open创建一个打开页面的按钮,但它没有做任何事情

<input type = "button" value="Two Players" onClick = "window.open(Two.html);">

1 个答案:

答案 0 :(得分:7)

<input type = "button" value="Two Players" onclick = "window.open('Two.html');">

而不是

<input type = "button" value="Two Players" onclick = "window.open(Two.html);">

<强>不要&#39;忘记这两个:''为您的路径Two.html

FIDDLE: http://jsfiddle.net/abdennour/XqsC5/