no

How to Access Asp:textbox With Runat=server Attribute in Javascript

For example you have a textbox which has a default value, and you want to clear that value when the user click on the textbox: <asp:Te...

For example you have a textbox which has a default value, and you want to clear that value when the user click on the textbox:


<asp:TextBox ID="txtBox" runat="server" onclick="clear()" Text="Enter Keyword" />

<script type="text/javascript">
        function clear() {
            document.getElementById("<%=txtBox.ClientID %>").value = "";
        }
</script>     

Related

c# 9000558079851818502

Post a Comment Default Comments

Outsourcing

Are you looking for freelancers in the Philippines? Get in touch.

Donations

If you like what I do, you can support this channel by buying me a coffee. I would be grateful for your contribution! Your donations will help me create more FREE online courses and learning materials for programmers and remote workers.

item