2014-11-22 39 views
1

是否可以在WordPress中使用下面的代碼將rel="nofollow"添加到html按鈕中。是否可以在WordPress中的HTML按鈕中添加「無後續」標籤

<input type="button" 
    onclick="window.open('http://www.example.com/');return false;" 
    value="TEXT" /> 

我使用上面的代碼顯示外部鏈接,並希望添加rel="nofollow"這些外部鏈接。

如果還有什麼比以上更好請告訴我。

現在我知道我們可以使用標籤來製作按鈕,但是在鼠標懸停的情況下它仍然顯示標籤的URL,它也允許我想要避免的按鈕的文本選擇[這些在上面的代碼中不是這種情況我轉貼]

+0

爲什麼不''TEXT? – nathancahill 2014-11-22 05:35:20

+1

'rel ='nofollow''不是''的有效屬性。你想達到什麼目的? – nathancahill 2014-11-22 05:36:01

回答

1

,你可以這樣做:的

<a href="http://www.example.com/" target="_blank" rel="nofollow"> 
<input type="button" value="TEXT" /></a> 

代替:

<input type="button" 
onclick="window.open('http://www.example.com/');return false;" 
value="TEXT" /> 
相關問題