Jump to content

[SOLVED] How to - input button onclick:"Go to this URL" - ?


joemamahunt

Recommended Posts

This works for me:

<input type="button" value="Click Here" onclick="javascript:window.location.href='http://www.google.com'" />

 

But note that it's JS, you should have posted in the JS board.

 

Hope it helps.

Link to post
Share on other sites

onclick="window.location.href=\'http://www.x.net/x.php\'

 

You didn't enclose the entire attribute in double quotes.

 

You didn't need to escape the single quotes since they were inside of double quotes.

 

Thought you should know why it wasn't working.

Link to post
Share on other sites

Archived

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

×
×
  • Create New...

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.