onchange of select

<select name=sel onchange="bao(this.options[this.options.selectedIndex].value)">
<option value="">请选择
<option value="1">Item 1
<option value="2">Item 2
<option value="3">Item 3
</select>
<script>
function bao(s)
{
    txt.value+=s;
    //选择后,让第一项被选中,这样,就有Change啦.
    document.all.sel.options[0].selected=true;
}
</script>
<textarea id=txt></textarea>
posted @ 2015-05-20 10:39  Thunder_Storm  阅读(112)  评论(0)    收藏  举报