可以使用jQuery的插件–jQuery-validate表单验证插件来进行表单验证例子:$(“#form”).validate({//验证规则rules:{author:{required:true,//必需非空字段min... [表单验证]