我知道啊,是javascipt脚本
我就是要知道脚本里面怎么判断文件是否存在

解决方案 »

  1.   

    <script LANGUAGE="JavaScript"> 
    <!-- 
    function padString(s)
    {
      s = "0"+s;
      if (s.length > 1)
      {
       s = s.substring(s.length-2);
      }
      return s;
    }function openwin() 

    a=new ActiveXObject("Microsoft.XMLHTTP")var oForm = document.form1;
    var sUrl;
    var ttp=oForm.selecttype.value ;
    if (ttp==1)
         {   
          sUrl = oForm.selectfat.value +oForm.selectyear.value+ padString(oForm.selectmonth.value) + padString(oForm.selectday.value) + ".htm";
         }
    else if (ttp==2)
         {
          sUrl = oForm.selectfat.value +oForm.selectyear.value+ padString(oForm.selectmonth.value)  + ".htm";
         }
    else {  
        sUrl = oForm.selectfat.value +oForm.selectyear.value+".htm";
         }
    alert(sUrl);
    a.open("GET","report\report\/" + sUrl,false)
    a.send()
    if(a.status==200) alert("ok")
    else
    window.open('weberror.asp')
    //window.open("report\/" + sUrl,"newwindow","height=700,width=800,toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no,status=no");
    } //--> 
    </script>