Click here to Skip to main content
15,921,169 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have one .aspxpage contains 19 rows.Every row contain 7 textboxes one dropdown button i want to show one row only in that page by clicking + button it will automatically added to page..So can any one help me i am new web pages so can pls help indetail coding...

What I have tried:

i have no idea about this topic i write the code for 19 textboxes i want to reduce the code.
Updated 28-May-17 21:17pm

1 solution

<head runat="server">

        function addRow()
            var tableRef = document.getElementById('myTable').getElementsByTagName('tbody')[0];

            // Insert a row in the table at the last row
            var newRow = tableRef.insertRow(tableRef.rows.length);

            // Insert a cell in the row at index 0
            var newCell = newRow.insertCell(0);

            var input = document.createElement('input');
            input.type = "text";
            // Append a text node to the cell

            return false;

    <form id="form1" runat="server">
        <button onclick="return addRow();">click me</button>
        <table id="myTable" border="1">
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900