Skip to content

Instantly share code, notes, and snippets.

@houoop
Created November 21, 2012 10:26
Show Gist options
  • Save houoop/4124149 to your computer and use it in GitHub Desktop.
Save houoop/4124149 to your computer and use it in GitHub Desktop.
js:image-upload-type-filter
if (!/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(ths.value)) {
alert("你选择的不是图片文件");
ths.value = "";
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment