扫码关注官方订阅号
查看参考
当选择或单击(按钮)库名称时,我希望下一个非活动按钮变为活动状态(变成亮红色)。
我用谷歌搜索并发现角度中有一个(模糊)和(焦点)事件
您可以通过 JavaScript 禁用和启用按钮:
const normalButton = document.querySelector('.normal'); const disabledButton = document.querySelector('.disabled'); disabledButton.disabled = true; normalButton.addEventListener("click", ()=> { disabledButton.disabled = false; })
Click on 'aaaa' button to enable the other button aaaa bbbb
Click on 'aaaa' button to enable the other button
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
您可以通过 JavaScript 禁用和启用按钮: