我设置了botton 一个属性 disabled=“true”. 但是当我的输入框事件满足条件的时候,需要把按钮变成可用。 用js设置属性:document.querySelector("#next").setAttribute("disabled","false");无效,设置成:document.querySelector("#next").setAttribute("disabled","");也无效。 这是非常常用的场景,不知道如何实现了都。

1***@163.com
- 发布:2021-03-17 23:31
- 更新:2021-03-17 23:36
- 阅读:375
mui中设置btn为只读后如何恢复可用?
分类:HTML5+
1 个回复
1***@163.com (作者)
还是自己找到了解决的方法。哈哈 document.getElementById("next").removeAttribute("disabled");