If a control isdisabled
It cannot be edited andIts content was excluded when the form was submitted. If a control isreadonly
It cannot be edited, but its content (if any) is still included with the submission.
That is: When Readonly=true, the control ID can still be queried the day before and after. When the diabled=true, or when the visible=true, once the form is submitted by the foreground, its ID will no longer be recognized by the foreground, at this time, the TextBox space and the label space function will be similar.
In the actual code, because of the limitations of the label control, many times the TextBox control is borrowed, but the display is the same as the label. The following code
<asp:textbox id= "lblcomment" runat= "Server" width= "$" readonly= "true" visible= "true" borderwidth= "0px" borderstyle= "None" >
</asp:Textbox>
The simple analysis is as follows: Setting BorderWidth to 0,borderstyle is set to none, and its display will be the same as label. ReadOnly is set to True, inner text will not be edited.
The following adds a JS control property to modify the function
function Showcomment (Selectedcontrol, Control1, Control2, Judgepara, Width1, Width2, msg) {if (control1! = null && Amp Control2! = null) {if (Selectedcontrol.value = = Judgepara) {control1.value = msg; Control2.style.width = width1; } else {control1.value = ""; Control2.style.width = Width2; } }}
Its invocation method
<aspx:textbox id= "Txtcodekubun" runat= "Server" imemode= "Disabled" width= "30px" tabindex= "1" onfocus= "Ongreen (' Txtcodekubun ')" &NBSP ; onkeyup= "Txtchange (This,document.getelementbyid (' Cmbcodekubun '))" onblur= "Txtchangeblur (This,document.getelementbyid (' Cmbcodekubun ')") onchange= "Showcomment (This,document.getelementbyid (' lblcomment '), &N Bsp document.getelementbyid (' txtcomment '), , &NB Sp ' 013 ', ' 185px ', ' 400px ', '*comment:how is you! ') " maxlength= "3" lengthasbytes= "true" > </aspx:Textbox>
ASP. Javascript Operations TextBox Property Application ()