jQuery视频格式的验证

$(document).on('change','#videofile',function() {
var file = this.files[0];
if (!/video\/\w+/.test(file.type)) {/*可以把autio改成其他文件类型 比如 image*/
layer.msg("只能选择MPEG4格式音频文件!",{icon: 1, time: 1000});
requset=false;
}
});
posted @ 2018-11-20 21:34  别动我的猫  阅读(670)  评论(0)    收藏  举报