Frage

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?

War es hilfreich?

Lösung

you can also try this

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

Andere Tipps

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>
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top