$(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; }});