Вопрос

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?

Это было полезно?

Решение

you can also try this

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

Другие советы

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>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top