我發現自己不知所措。如果某些條件成立,我負責將文本字段設置為(非)只讀的看似微不足道的任務。好吧,我已經碰壁了。我嘗試過以下各種版本:if(someTextBox.enable==false){
someTextBox.enable=true;}包括 someTextBox.setAttribute("enable", true);乃至someTextBox.setAttribute("readOnly", true);我正在使用 Chrome 開發工具,并且可以看到 null 的各種形式,包括忽略的 if 子句。
我需要 javascript/html 幫助來制作文本字段(而不是只讀)
慕哥6287543
2023-12-14 14:22:14