How to display input field using button on-click function with Javascript/typescript/Jquery? -


i have created button adding contact details. when user clicks, few input fields should display user first name, last name.

how can this?

check out fiddle.

it uses jquery makes easier.

here snippet.

$("#button").click(function() {    $("#fn").show();    $("#ln").show();  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <input id="button" type="button" value="click">  <br>  <div id="fn" hidden>first name :    <input type="text" />  </div>  <br>  <div id="ln" hidden>last name :    <input type="text" />  </div>


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -