Resetting a multi-stage form with jQuery

前端 未结 30 2020
谎友^
谎友^ 2020-11-22 00:58

I have a form with a standard reset button coded thusly:


Trouble i

30条回答
  •  不知归路
    2020-11-22 01:17

    You might find that this is actually easier solved without jQuery.

    In regular JavaScript, this is as simple as:

    document.getElementById('frmitem').reset();
    

    I try to always remember that while we use jQuery to enhance and speed up our coding, sometimes it isn't actually faster. In those cases, it's often better to use another method.

提交回复
热议问题