Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 jquery 禁用文本框:
$('#<%=txtFrom.ClientID %>').attr('disabled', true);
它看起来像 disabled: ,但实际上不是,我可以在那里写。为什么?
更新:通过在代码中添加输入来修复:
$('#<%=txtFrom.ClientID %> input').attr('disabled', true);
你需要这样做:
$('#YOUR_ELEMENT_ID').attr("disabled", "disabled");