我的設計,我想我的html頁面上使用自定義按鈕工作錯誤的,但它沒有工作HTML按鈕不工作,在Chrome和Firefox
<a href="@Url.Action("AddCategories/" + Model.Id, "test")">
<button type="button">
<a href="#" id="" class="btn">Add new things here</a>
</button>
</a>
這裏是校驗碼http://jsfiddle.net/YGCWZ/
請有人可以幫助我做到這一點。我有另一件事情,Firefox和鉻都做錯了。
<a href="/test/AddCategories/1">dfdsf
</a>
<button type="button"><a href="/test/AddCategories/1">
</a><a href="#" id="" class="btn">Add new things here</a>
</button>
有人可以幫我找出做這個鏈接的方法。
感謝
我會建議使用JavaScript放在相應的按鈕clickListener,而不是使用當前'href'結構。另外,問題是什麼? – Harti 2012-03-06 13:56:14
爲什麼在按鈕內有超鏈接?看起來Chrome和Firefox正在直接渲染你寫的內容,而IE只是選擇刪除內部標籤。有關使用方法,請參閱:http://www.w3.org/wiki/HTML/Elements/button和http://www.w3schools.com/html5/tag_button.asp – 2012-03-06 14:05:16
您能解釋一下除了什麼嗎?那? – 2012-03-06 14:26:31