Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
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);">
.html
Two
'Two.html'
<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
''
Two.html
FIDDLE: http://jsfiddle.net/abdennour/XqsC5/
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
.htmlproperty ofTwowhich is not the same as the string'Two.html'.