0

我在我的谷歌网站上单击编辑页面,然后在我添加此代码的地方添加 html 框

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

但是由于某种原因它不起作用,尽管我在一些 html 编辑器上对其进行了测试并且它起作用了。有任何想法吗?

4

2 回答 2

2

you can also try this

<a href="www.google.com" targer="_blank"><input type="button" value="Click to open Google" /></a>
于 2012-12-05T02:48:25.003 回答
1

它可能是某种安全功能,代码是正确的,你可以在这里看到。但在这里它也不起作用。

您可以尝试使用链接:

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

Ps.:关闭所有标签很好(</button>在按钮文本之后):

<button type="button" onclick="window.open('http://www.google.com','_blank','resizable=yes')" >Click to open Google</button>
于 2012-12-04T17:15:12.970 回答