
html按鈕設(shè)置超鏈接的方法一:使用超鏈接與button結(jié)合的方法
html按鈕超鏈接代碼如下:
!DOCTYPE html html head title /title /head body a href= http://www.survivalescaperooms.com/ input type=button value= php /body /html
html按鈕超鏈接效果如下:

說明: a 標簽的 href 屬性用于指定超鏈接目標的URL。
html按鈕設(shè)置超鏈接的方法二:使用鏈接和css樣式設(shè)置將超鏈接設(shè)置成按鈕的形狀
html按鈕超鏈接代碼如下:
!DOCTYPE html html head title /title style type= text/css a.button { -webkit-appearance: button; -moz-appearance: button; appearance: button; text-decoration: none; color: initial; /style /head body a href= http://www.survivalescaperooms.com >html按鈕設(shè)置超鏈接的方法三:使用 form表單來設(shè)置html按鈕超鏈接
html按鈕超鏈接代碼如下:
!DOCTYPE html html head title /title /head body form method= get action= http://www.survivalescaperooms.com/ button type= submit php /button /form /body /html
html按鈕設(shè)置超鏈接的方法四:使用window.location.href方法
完整的寫法:
a href= 鏈接 input type=button quot;window.location.href( 連接 ) /a
說明:
1、若直接在本頁跳轉(zhuǎn)到新的頁面,則用: input type=button quot;window.location.href( 連接 )
2、如果需要打開一個新的頁面進行跳轉(zhuǎn),則用: input type=button quot;window.open( 連接 )
以上就是本篇文章的全部內(nèi)容了,更多其他精彩的內(nèi)容大家可以關(guān)注PHP !!!
以上就是html按鈕怎么設(shè)置超鏈接?html按鈕超鏈接的四種實現(xiàn)方法的詳細內(nèi)容,html教程
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。
新聞熱點
疑難解答