Jquery 清空表单正确姿势(解决错误:$(...).reset is not a function)

来源:互联网 发布:想做淘宝主播要培训吗 编辑:程序博客网 时间:2024/06/04 23:05

像下面这样写是会报错:$(…).reset is not a function

    $('#staticAddForm').reset();

应该改成如下写法

        $('#staticAddForm')[0].reset();