Can not set readonly on input field in IE

前端 未结 3 1839
死守一世寂寞
死守一世寂寞 2021-01-18 02:26

I have a simple input field:


and some JQuery code:

$(e.curre         


        
3条回答
  •  北恋
    北恋 (楼主)
    2021-01-18 02:54

    I have used Focusin() function in jquery side with Id. When I click on textbox then we remove readony attribute as below:

    HTML:

    
    

    Jquery:

    $("#txtCustomerSearch").focusin(function () {
        $(this).removeAttr('readonly');
    

    });

    Note: it will working in IE11 and other browser.

提交回复
热议问题