How to remove focus from input field in jQuery?

后端 未结 5 1315
故里飘歌
故里飘歌 2020-12-23 23:54

I am setting the focus on a certain input field when loading a page using the following line:

$(\'#myInputID\').focus();

Is there a way th

5条回答
  •  一整个雨季
    2020-12-24 00:33

    $(':text').attr("disabled", "disabled"); sets all textbox to disabled mode. You can do in another way like giving each textbox id. By doing this code weight will be more and performance issue will be there.

    So better have $(':text').attr("disabled", "disabled"); approach.

提交回复
热议问题