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

后端 未结 7 1174
醉梦人生
醉梦人生 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:46

    I've tried all the possibilities. Nothing worked for me except the following. var element = document.querySelectorAll("input[id=btn1]"); element[0].setAttribute("disabled",true);

提交回复
热议问题