这段代码起到了限制格式跟尺寸,我想让它能限制图片字节大小,那是就好了,请高手帮帮忙<Script   language="javascript">   
  function   mysubmit()   
  {   
  theform=document.form1;   
          if(theform.picture.value=="")   
          {   
          alert("请点击浏览按钮,选择您要上传的jpg或gif文件!")   
          theform.picture.focus;   
          return   (false);   
          }   
          else   
          {   
          str=   theform.picture.value;   
    
          strs=str.toLowerCase();   
          lens=strs.length;   
      extname=strs.substring(lens-4,lens);   
          if(extname!=".jpg"   &&   extname!=".gif")   
          {   
          alert("请选择jpg或gif文件!");   
          return   (false);   
          }   
          }   
    
          if(form1.img1.width>200   ||   form1.img1.height>100)   
          {   
          alert("您上传的图片尺寸太大,这样会影响美观!请裁剪后再上传!")   
          return(false);   
          }   
  }   
  </script>   
  <form   name=form1   action=""   method=post"   onsubmit="return   mysubmit();">   
  <input   type="file"   name="picture"   onpropertychange="img1.src=this.value;">   
  <input   type="submit"   value="上传"   name="B1"   style="font-size:   12">   
  <img   id="img1">   
    
  <P> </P>   
  </form>