重點1:如何把多參數的option加入select內:s1.options.add(new Option("水餃"))
    重點2:不同函數間要共用一個變數,要把宣告為全域變數:var p1;
    
    選擇產品名稱:
        
    
    顯示產品價格: 
    顯示產品數量: 
    
    
    
    (1).物件object變數的陣列,建立2種方法:
    方法1:(最常使用)
    stu = [{name:"john", chinese:95, english:75, math:70},{name:"tom", chinese:75, english:85, math:60},{name:"peter", chinese:95, english:100, math:65}];
    方法2:
    var stu = new Array(); //一維陣列 物件
      stu[0] = {name:"john", chinese:95, english:75, math:70};
      stu[1] = {name:"tom", chinese:85, english:85, math:90};
    方法3:
      var stu = new Array(); //一維陣列 物件
    var stu[0] = new Object();
    stu[0].name = "john";
    stu[0].chinese = 95;
    stu[0].english = 75;
    stu[0].math = 70;
    var stu[1] = new Object();
    stu[1].name = "tom";
    stu[1].chinese = 85;
    stu[1].english = 85;
    stu[1].math = 90;  
    
      方法4:(少用)
      var stu = new Array(); //一維陣列 物件
      prod[0] = new student("john", 95, 75,70);
      ....
      ....
      //產生建構子函數,以建立新的物件變數
      function student(inputName, inputChinese, inputEnglish,inputMath) {
    this.name = inputName;
    this.chinese = inputChinese;
    this.english = inputEnglish; 
    this.math = inputMath;
    }  
    
     
    (2).新增一個項目到select-option內,傳統javascript方法:
      for(i=0;i<array.length;i++)
      {
      select01.options.add(new Option(array[i])); 
      } 
      注意:第1個options(小寫O,有s),第2個Option(大寫O,沒s)
    (3)如何知道下拉式選單select是選到第幾個option,傳統javascript方法:
    第幾個 = select001.selectedIndex
     
    
    (4).JavaScript 的物件可分三類:
      (A)內建的物件(如日期、數學等物件)
      (B)根據網頁的內容所建立的文件物件模型(Document Object Model ,簡稱 DOM)
    (C)使用者自訂的物件object變數  
    (6).物件object變數的陣列,建立方法:
    var prod = new Array(); //一維陣列 物件
    prod[0] = new product("可口可樂", 25, 100);
    (7).如何取得第i個陣列的money屬性:
    prod[i].money;
    (8)下拉式選單select 的新增方法:
    
    方法1:使用程式碼來新增(一行一行新增):
      select01.options.add(new Option(prod[0].name,prod[0].money));
      select01.options.add(new Option(prod[1].name,prod[1].money));
      select01.options.add(new Option(prod[2].name,prod[2].money));
    方法2:使用迴圈來新增
      for(i=0;i<prod.length;i++)
      {
      select01.options.add(new Option(prod[i].name,prod[i].money));
      }
    (9)改變select選單選擇項目時,要呼叫哪個函數:
      要在select01設定編輯標籤:onChange:設定呼叫的函數名稱
    (10).如何知道select選單是按到哪個項目(index):
      select01.selectedIndex
    可口可樂
      阿Q桶麵義美水餃