document.getElementById('btnid').disabled is not working in firefox and chrome

后端 未结 7 1173
醉梦人生
醉梦人生 2020-12-08 21:16

I\'m using JavaScript for disabling a button. Works fine in IE but not in FireFox and chrome, here is the script what I\'m working on:

function disbtn(e) { 
         


        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-08 21:57

    Some time some javascript functions does not work on some specific browser. I would suggest you to start using JQuery, which gives you normalized JS, taking care of different browser requirement

    $('#btn1').each(function(){
        this.disabled = false;
    });
    

提交回复
热议问题