Domanda

I click edit page on my google site and then add html box where i add this code

<button type="button" onclick="window.open('http://www.google.com','_blank','resizable=yes')" >Click to open Google</button>

But for some reason it doesn't work, although i tested it on some html editors and it worked. Any ideas?

È stato utile?

Soluzione

you can also try this

<a href="www.google.com" targer="_blank"><input type="button" value="Click to open Google" /></a>

Altri suggerimenti

It may be some kind of security feature, the code is correct, you can see it Here. But Here it doesn't work too.

You can try to use a link:

<a href="www.google.com" target="_blank">Click to open Google</a>

Ps.: It's good to close all tags (</button> after button's text):

<button type="button" onclick="window.open('http://www.google.com','_blank','resizable=yes')" >Click to open Google</button>
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top