  <object   classid="clsid:F9043C85-F6F2-101A-A3C9-08002B2F49FB"   id="CommonDialog1"   width="0"   height="0"></object>     
  <form>     
  <p>     
  <select   name="Select1"   size="2"   style="width:400;height:150;">     
  <option   value=""></option>     
  </select>     
  <br>     
  选择的文件共：<input   name="Text1"   size="3"   readOnly   value="0">个     
  <input   type="button"   value="   选择文件...   "   name="B3"   onclick="VBScript:SelectMutipleFiles">     
  </p>     
  </form>     
  <script   language="VBScript">     
  Function   NewOption(s)     
  set   NewOption   =   document.createElement("Option")     
  NewOption.text   =   s     
  NewOption.value   =   s     
  End   Function     
  Sub   SelectMutipleFiles     
  With   CommonDialog1     
  .DialogTitle   =   "选择您要上传的文件"     
  .FileName   =   ""   '清空原来的选择     
  .MaxFileSize   =   1024   *   4   '存储文件名字符串所需内存     
  .Flags   =   &H200   +   &H80000   '允许多选，允许长文件名     
  .Filter="所有文件(*.*)|*.*|老崔文件(*.cxp)|*.cxp|文本文件(*.txt)|*.txt"     
  .ShowOpen     
  End   With     
  document.forms(0).Select1.options.length   =   0     
  document.forms(0).Text1.value   =   0     
  dim   FileNames,   I     
  FileNames   =   Split(CommonDialog1.FileName,   Chr(0))     
  document.forms(0).Text1.value   =   (UBound(FileNames)+1)     
  If   UBound(FileNames)=0   Then     
  document.forms(0).Select1.options.add   NewOption(FileNames(I))     
  Else     
  For   I=1   To   UBound(FileNames)     
  FileNames(I)=FileNames(0)   &   "\"   &   FileNames(I)     
  document.forms(0).Select1.options.add   NewOption(FileNames(I))     
  Next     
  End   if     
  End   Sub     
  </script>     



