Just wondering if there is a way to get a HTML <button>
element to link to a location without wrapping it in an <a href...
tag?有沒有辦法得到一個<button>元素鏈接到一個位置,而在<a href ... tag?
Button currently looks like:
<button>Visit Page Now</button>
What I would prefer not to have:
<a href="link.html"><button>Visit Page Now</button></a>
The button is not being used within a form so <input type="button">
is not an option. I am just curious to see if there is a way to link this particular element without needing to wrap it in an <a href
tag.
Looking forward to hearing some options/opinions.
爲什麼你想要一個按鈕成爲一個鏈接?爲什麼不只是有一個鏈接? – robertc 2011-02-17 08:38:07
@robertc,我通常使用鏈接,但那麼