【发布时间】:2016-10-02 09:46:00
【问题描述】:
它工作得很好,但是……嗯……我不知道我做了什么……
<form>
<span style="font-family:arial,helvetica,sans-serif;
font-size:24px;font-weight:bold;">
<input onclick="window.location.href='
https://trehebe.blogspot.gr/p/online-paraggelia.html'
target:_blank" style="background:rgb(153, 0, 255); border-radius:20px;
border:1px solid rgb(217, 217, 217);
box-shadow:rgb (153, 153, 153) 6px 6px 5px; color:#ffffff;
cursor:pointer; font-weight:bold; padding:10px; width:100px;"
type="button" value="Order" />
</span>
</form>
【问题讨论】:
-
您为什么认为有问题?请阅读How to Ask 一个正确的问题。
-
<input onclick="window.location.href='https://trehebe.blogspot.gr/p/online-paraggelia.html'" target="_blank" style="background:rgb(153, 0, 255); border-radius:20px; border:1px solid rgb(217, 217, 217); box-shadow:rgb (153, 153, 153) 6px 6px 5px; color:#ffffff; cursor:pointer; font-weight:bold; padding:10px; width:100px;" type="button" value="Order" />` -
您为什么使用
<input>作为链接?只需使用正确的<a>标签即可。 -
当@MikeC 询问你为什么使用
input标签时,target属性仅适用于<a>标签
标签: javascript html button