jquery last focused element

后端 未结 1 1312
野的像风
野的像风 2021-01-18 05:42

I have a basic login form, which uses ajax to login users. If the details are incorrect text is displayed showing login has failed. When this is shown the last textbox the u

1条回答
  •  梦谈多话
    2021-01-18 06:13

    Subscribe all of your inputs to the focusout event

    $('.input').focusout(function () {
       $('#myform').data('lastSelected', $(this));
    });
    

    0 讨论(0)
提交回复
热议问题