var type="";
  if(document.getElementById("upTitleImage").value!=''){
   type=document.getElementById("upTitleImage").value.match(/^(.*)(\.)(.{1,8})$/)[3];
      type=type.toUpperCase();
  }
  
     if(type!="JPEG"   &&   type!="PNG"   &&   type!="JPG"   &&   type!="GIF"){
      alert("请上传图片类型");   
      return;
     }
	
posted on 2009-08-01 12:16 
长春语林科技 阅读(420) 
评论(0)  编辑  收藏  所属分类: 
js