星期二, 四月 26, 2005

Html: label (radio bottom)小技巧

<input type="radio" id="abc" /><label for="abc">這是oo</label>
<input type="radio" id="def" /><label for="def">這是xx</label>
<label><input type="radio">這是oo</label>
<label> <input type="radio">這是xx</label>

用 label tag 能做到, 並非一定要點到圓圈的 Radio Button才能選取, 只要點到文字就可以選擇到 radio 的圈圈了~~

使用 label

沒用 label

這是oo 這是xx
相關標籤

this is comment icon hi [回覆]

very good!

Comment by hi (02/16/2006 08:35)

this is comment icon 疑? [回覆]

???中的id是必需的??
下面?句?中?有id?性,仍然可以,能????????。


Save user name and password in a cookie

Comment by zhang2000 (05/10/2006 00:14)

this is comment icon 回 zhang2000 [回覆]

id 這屬性主要是要對應到 label for 的那一個~
主要是在於可以方便使用者操作使用, 就算沒有 id, label 都還是可以正常運作的~
主要差別, 您可以試試上面的兩個(有用 label 和沒用 label 的差別)... :)

Comment by Tsung (05/10/2006 09:40)
Add this page to del.icio.us Add this page to Yahoo Taiwan's bookmark Add this page to MyShare

發表迴響

標題

內容 (限制 1000 字)

暱稱

電子郵件

個人網頁


 authimage


PS: 若無法留言, 請先確認是否有打開 JavaScript, 造成您的困擾, 實在萬分對不起 Orz...(如果無法留言, 勞煩可以發信給我好嗎? 謝謝.)
PS2: 若您的留言被誤判, 我都會再自行看過, 不需要一直重覆張貼~