//校验失败时 <input id="email" type="text" class="easyui-validatebox validatebox-text validatebox-invalid tooltip-f" name="email" > tooltip-f:当鼠标hover上去的时候,就会添加此类,用于提示错误信息! //校验成功时 <input id="email" type="text" class="easyui-validatebox validatebox-text" name="email" > 当验证通过时,则会将 validatebox-invalid tooltip-f 两个类移除。 当我们想给其设置默认值初始化时, 前提:必须保证所设置的默认值符合校验规则。 为了避免校验样式的存在。 $("#email").val("123456@qq.com").removeClass("validatebox-invalid").removeClass("tooltip-f"); 如果在input 元素上自己没有添加设置过任何class,则可以$("#email").val("123456@qq.com").removeClass();