87,901
社区成员
发帖
与我相关
我的任务
分享
<select name="s_id">
<option value= "1" > 好 </option>
<option value= "2" > 我 </option>
<option value= "3" > 你 </option>
</select>
<div id= "a ">
<textarea id= "1" style="display:none;"> 好好好好 </textarea>
<textarea id= "2" style="display:none;"> 我我我我 </textarea>
<textarea id= "3" style="display:none;"> 你你你你 </textarea>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('select[name=s_id]').change(function(){
curTextAreaID = jQuery(this).val();
jQuery('#'+curTextAreaID).show();
jQuery('#'+curTextAreaID).siblings().hide();
});
});
</script>