目标对 "telephone anchor" HTML 重要吗

Does the target matters on "telephone anchor" HTML

如果我有这样的代码:

<a href="tel:+17027613327" target="_blank">
    <font color="blue">
       <strong>702-761-3327</strong>
    </font>
</a>

问题是……目标重要吗?我可以放 target='_blank' 吗?[​​=13=]

看来您可以输入 target="_blank",参见 here

来自https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a

您有几个选择。

  • _self 将加载到当前 window.

  • _blank 加载一个新的 window。

  • _parent 加载到父级 window,否则工作方式与 _self 相同

  • _top 加载到被点击的 window 没有父级的祖先,即顶级 window。如果没有父项,它的工作方式也与 _self 相同。

如果您不想更改用户的当前页面,

_blank 听起来是最好的选择,这似乎是拨打 phone 号码时所期望的效果。

因为tel:不是浏览器协议,所以target属性没有任何意义。您可以安全地摆脱它。