[英]ASP.NET - server side control & javascript interaction
on a page with textbox control, lets say this textbox is disabled on server side page load. 在具有文本框控件的页面上,可以说此文本框在服务器端页面加载时被禁用。 What would happen if a javascript tries to set visibility of the textbox to false ? 如果JavaScript试图将文本框的可见性设置为false,会发生什么?
Edit: Can the textbox be hidden by javascript even though it's disabled ? 编辑:即使禁用了文本框,它也可以被javascript隐藏吗?
TIA TIA
是的,在服务器端禁用设置仅添加禁用属性。
controlID.Attributes.Add("disabled", "true");
This disables the control... 这将禁用控件...
controlID.Attributes.Remove("disabled");
This enables the control. 这样可以进行控制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.