本帖最后由 Seanzheng1993 于 2009-12-17 13:07:04 编辑

解决方案 »

  1.   

    Name_Sauce = Name_Sauce.toString() + document.form1.sauce.options[i].selected.text; 
      

  2.   

    document.form1.sauce.options[i].selected.text这个确定能得到 吗!
      

  3.   

    Name_Sauce = Name_Sauce.toString() + document.form1.sauce.options[i].selected.text.toString(); 
      

  4.   

    要计算,必须将参与计算的元素转换为Number类型。
      

  5.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
     <script>
     
     window.onload = function() {
      var aa = "";
      var count = document.getElementById('sel').options.length;
      document.getElementById('sel').onchange = function() {
      for(var i=0;i<count;i++) {
      if(document.getElementById('sel').options[i].selected) {
      aa += document.getElementById('sel').options[i].text;
      alert(aa);
      }
      }
      }
     }
     
    </script>
     </head>
    <body>
    <select id="sel">
    <option value="11">11</option>
    <option value="22">22</option>
    <option value="33">33</option>
    </select>
     </body>
     </html>
    这个试试看看~~~
      

  6.   


    document.form1.sauce.options[i].selected.text这句话有错误吧?
    document.form1.sauce.options[i].selected返回一个布尔值,后面的.text肯定回报错的
    楼主的意思是document.form1.sauce.options[i].text吧