TS中readonly的设置方法

动态设置readonly的方法

    document.getElementById(`test`).setAttribute('readonly','true');
    document.getElementById(`test`).removeAttribute('readonly');    

不能使用 setAttribute('readonly','false');  这样无效

原文地址:https://www.cnblogs.com/zxjiangxiaolong/p/12753081.html