Is it possible to do something like the following in jQuery:
if($('UploadField').val().contains('.gif','.jpeg'开发者_JS百科,'.jpg','.png'))
{
}
...checking for an array of values?
if ($('UploadField').val().match(/\.(gif|jpeg|jpg|png)/))
{
}
should work
精彩评论