문제

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