Jump to content

Archived

This topic is now archived and is closed to further replies.

hvle

button click and open link in new window

Recommended Posts

hi guys,

I have a button like this:
<input type="button" value="view post" onClick="document.location.href='http://google.com';">

when click on this button, it will surf to google.com
however, I also want it to open google in a new window.

thanks

Share this post


Link to post
Share on other sites
just use an anchor...

<a href="http://google.com" target="_blank">view foobar</a>

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.