看板 Web_Design 關於我們 聯絡資訊
※ 引述《OTTOdoob ()》之銘言: : 我做了一個最簡單的按鈕type=button : 想要按下去之後連結到 A.htm, target是 _self : 試過三種寫法都失敗了 : 每種寫法按下去後仍然停留在本頁,沒有跳到 a.htm : 請前輩指點一下哪些地方寫錯了,謝謝 : 寫法一 : <Input type="button" value="q" onClick="window.location.href='a.htm'"> onClick="javascript:window.location.href='a.htm';"> ^^^^^^^^^^^ ^ : 寫法二 : <Input type="button" value="q" onClick="woondow.open('a.htm','_self')"> 同上 : 寫法三 : <a href="a.htm" target="_self"> : <Input type="button" value="q"> : </a> 這個....我沒看過 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.171.109.226
kc655039:寫法二....應該要可以的,是typo嗎woondow? 12/15 19:35
kc655039:其實只要是敘述都應該可以,href那個是不是一定要完整路徑 12/15 19:46
kc655039:?我不清楚sorry 12/15 19:46