jhengfei
爱JAVA,爱生活

假设表单为formPost,上传图像域为photo_file,允许上传的图像类型为jpg, bmp, gif

              if (document.formPost.photo_file.value.substr(document.formPost.photo_file.value.length - 4, 4).toLowerCase().match("^.jpg|.bmp|.gif$") == null)
              {
                  alert("图像类型不是JPG,BMP,GIF类型");
              }

posted on 2006-01-19 15:01 点滴铸就辉煌 阅读(419) 评论(0)  编辑  收藏 所属分类: 技术点滴

只有注册用户登录后才能发表评论。


网站导航: