<textarea id="msgTxt"  name="content" cols="70"></textarea><select name="select">
      <option selected>--请选择--</option>
      <option>普通</option>
      <option>急件</option>
      <option>特急</option>
</select>当我选择普通的时候,在textarea域中就显示普通这两个字,如果再选择急件的话,就在textarea域中追加急件这两个字,也就是说textarea域中的内容变成:”普通、急件“在线等。。如果说的不是很清楚,可以再讲一次。希望会的朋友能帮忙解决一下,谢谢了!

解决方案 »

  1.   

    <script type="text/javascript">
    function ss(a){
    if(a.selectedIndex!=0){
    var t=document.getElementById("msgTxt");
    t.value+=a[a.selectedIndex].innerHTML;
    }
    }
    </script>
    </head><body>
    <textarea id="msgTxt" name="content" cols="70"></textarea>
    <select name="select" onchange="ss(this)">
      <option selected>--请选择--</option>
      <option>普通</option>
      <option>急件</option>
      <option>特急</option>
    </select>
    </body>
    这样??