![](../icon/headdata.png)
¡ÒÃÊÃéÒ§¿ÍÃìÁª¹Ô´á¹º Selection Box
¡ÒÃÊÃéÒ§ Selection Box ËÃ×Í Drop Down List ËÃ×Í List Box ¤×Í¡ÒÃÃѺ¢éÍÁÙŨҡ List ÃÒ¡Ò÷ÕèÁÕãËéàÅ×Í¡â´ÂÊÒÁÒö
àÅ×Í¡ä´éà¾Õ§á¤è˹Öè§ÃÒ¡Òà ¨Ðãªé¡Ã³Õ·ÕèÁÕÃÒ¡ÒÃãËéàÅ×Í¡ÁÒ¡ æ àªè¹ Çѹ·Õè à´×͹ »Õ ¾.È. à»ç¹µé¹
Tag
ª×èÍá·ç¡ | select |
µÓá˹è§á·ç¡ | ÍÂÙèÀÒÂã¹á·ç¡ <form>...</form> |
ÃٻẺ¡ÒÃãªéá·ç¡ | <select name="ª×èͪèͧ¡ÃÍ¡¢éÍÁÙÅ" size="value"> ..... </select> |
á͵·ÃÔºÔǵì | name ª×èͪèͧ¡ÃÍ¡¢éÍÁÙÅ size ¨Ó¹Ç¹µÑÇàÅ×Í¡·ÕèáÊ´§ |
¤èÒ value | µÑÇàÅ¢ 1,2,3 |
µÑÇÍÂèÒ§¡ÒÃãªé§Ò¹
<body>
<form name="select">
<b>¡ÃسÒàÅ×Í¡à´×͹à¡Ô´¢Í§·èÒ¹</b><br>
<selection name="month" size="1">
</body>
<b>¡ÃسÒàÅ×Í¡à´×͹à¡Ô´¢Í§·èÒ¹</b><br>
<selection name="month" size="1">
</selection>
</form>
¡ÒÃáÊ´§¼Å
¨Ò¡µÑÇÍÂèÒ§¨ÐàËç¹ä´éÇèÒ ¨ÐÂѧäÁèÁÕµÑÇàÅ×Í¡¨Ðµéͧ·Ó¡ÒáÓ˹´µÑÇàÅ×Í¡ãËé¡Ñº Selection ´éÇÂá·ç¡ Option
¡ÒáÓ˹´µÑÇàÅ×Í¡ãËé¡Ñº Selection ´éÇ Option
㹡ÒÃãªé§Ò¹ Selection ¨ÐµéͧÁÕ¡ÒáÓ˹´µÑÇàÅ×Í¡ ´éÇ option áÅÐÁÕ¡ÒáÓ˹´¤èҢͧµÑÇàÅ×Í¡´éÇ´ѧµèÍ仹Õé
Tag
ª×èÍá·ç¡ | option |
µÓá˹è§á·ç¡ | ÍÂÙèÀÒÂã¹á·ç¡ <select>...</select> |
ÃٻẺ¡ÒÃãªéá·ç¡ | <select name="ª×èͪèͧ¡ÃÍ¡¢éÍÁÙÅ" size="value"> <option value="value">¢éͤÇÒÁ </select> |
á͵·ÃÔºÔǵì | value ¤èҢͧ»ÃШӵÑÇàÅ×Í¡ |
¤èÒ value | µÑÇàÅ¢ 1,2,3 |
µÑÇÍÂèÒ§¡ÒÃãªé§Ò¹
<body>
<form name="select">
<b>¡ÃسÒàÅ×Í¡Çѹà¡Ô´¢Í§·èÒ¹</b><br>
<option value="2">Çѹ¨Ñ¹·Ãì<br>
<option value="3">ÇѹÍѧ¤ÒÃ<br>
<option value="4">Çѹ¾Ø¸<br>
<option value="5">Çѹ¾ÄËÑʺ´Õ<br>
<option value="6">ÇѹÈØ¡Ãì<br>
<option value="7">ÇѹàÊÒÃì<br>
</body> <b>¡ÃسÒàÅ×Í¡Çѹà¡Ô´¢Í§·èÒ¹</b><br>
<select name="month" size="1">
<option value="1">ÇѹÍÒ·ÔµÂì<br><option value="2">Çѹ¨Ñ¹·Ãì<br>
<option value="3">ÇѹÍѧ¤ÒÃ<br>
<option value="4">Çѹ¾Ø¸<br>
<option value="5">Çѹ¾ÄËÑʺ´Õ<br>
<option value="6">ÇѹÈØ¡Ãì<br>
<option value="7">ÇѹàÊÒÃì<br>
</select>
</form>
¡ÒÃáÊ´§¼Å
àÁ×èÍ¡Ó˹´µÑÇàÅ×Í¡´éÇ option ¡ç¨ÐÊÒÁÒöàÅ×Í¡µÑÇàÅ×Í¡ä´é àÃÒÊÒÁÒöãÊèµÑÇàÅ×Í¡ä´éµÒÁ·Õèµéͧ¡Òà ËÃ×͵ÒÁËÑÇ¢éÍ·ÕèàÃÒÍ͡Ẻ