disabled attribute does not work in firefox - for a div

后端 未结 3 1121
梦谈多话
梦谈多话 2021-01-22 16:17

hi my dear friends :
the below code works perfect in ie9 , but does not work in firefox 3.6

$(\'#ctl00_ContentPlaceHolder1_RadUploadImage\').attr(\'disable         


        
3条回答
  •  野性不改
    2021-01-22 16:51

    if you are using jQuery < 1.6 do this:

    $('#ctl00_ContentPlaceHolder1_RadUploadImage').attr("disabled", 'disabled');
    

    If you are using jQuery 1.6+:

    $('#ctl00_ContentPlaceHolder1_RadUploadImage').prop("disabled", true);
    

    See this question: .prop() vs .attr() for references why.

    Same answer was given here: jQuery .attr("disabled", "disabled") not working in Chrome

提交回复
热议问题