How do you set the “Visible” property of a ASP.NET control from a Javascript function?

后端 未结 9 573
不知归路
不知归路 2021-01-17 09:49

Bascially I want to know the best way to hide/show an ASP.NET control from a Javascript function. I figured I would just access the control in Javascript using:

<         


        
9条回答
  •  一生所求
    2021-01-17 10:03

    Set the style to "display: none".

    var theControl = document.getElementById("<%= txtEditBox.ClientID %>");
    theControl.style.display = "none";
    

提交回复
热议问题