Rohan Ramani

Rohan Ramani

  • NA
  • 786
  • 138.2k

Call JavaScript function on <a> for show hide textbox

Dec 18 2019 4:46 AM
Hi All,
I want to show hide the textbox on click of <a> anchor tag, using javascript.
  1. <asp:TextBox ID="txtMobile" CssClass="form-control" placeholder="Your Mobile Number" runat="server" required="required" Style="display: none"></asp:TextBox>  
  2.                         <asp:TextBox ID="txtEmail" CssClass="form-control" placeholder="Your Email Address" runat="server" required="required"></asp:TextBox>  
  3. <a id="lnkToggle" style="font-size: smaller" >Sign in with mobile number?</a>  
If I click SignIn with mobile then Mobile textbox should be visible, if I sign in with Email than Email textbox should be visible and hide the mobile textbox. 
 
 

Answers (2)