我有這個地址鏈接:如何將地址鏈接轉換爲單擊時更改頁面的按鈕?
<a href="/User/Account/Register">Register</a>
現在我想用一個按鈕這一點。如果我點擊按鈕,如何將其轉換爲頁面位置更改?
我有這個地址鏈接:如何將地址鏈接轉換爲單擊時更改頁面的按鈕?
<a href="/User/Account/Register">Register</a>
現在我想用一個按鈕這一點。如果我點擊按鈕,如何將其轉換爲頁面位置更改?
<input type="button" value="Register" onclick="windows.location.href='http://xyz.com';>
取代:
<a href="/User/Account/Register">Register</a>
與:
<button onclick="location.href='/User/Account/Register'">Register</button>
可以使用CSS對於相同
看到這個演示Fiddle
''? – Vucko
謝謝,但我所有的CSS設置爲
'' – Vucko