我的代碼:如何顯示/隱藏的div(jQuery的)
<select id="select">
<option id="1" value="thai language">option one</option>
<option id="2" value="eng language">option two</option>
<option id="3" value="other language">option three</option>
</select>
<div id="form1">content here</div>
<div id="form2">content here</div>
<div id="form3">content here</div>
我想是顯示DIV#form1的時候選擇選項1,隱藏窗口2 + form3,或 選擇選項2顯示div#form2並隱藏form1 + form2
沿着我在想什麼線。 $(this).attr('id')不會引用select本身的id?我想我必須得到選擇索引,抓住這個選項,然後得到ID。 – Sampson 2009-06-25 11:00:11