Web Analytics Made Easy -
StatCounter How to insert rows with value that comes from form input boxes? - CodingForum

Announcement

Collapse
No announcement yet.

How to insert rows with value that comes from form input boxes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to insert rows with value that comes from form input boxes?

    How to do these in jquery?

    These are the codes.
    PHP Code:
    <html>

    <
    head>
    <
    script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <
    script type="text/javascript">

            function 
    addRow() {
                var 
    myRow "C3";

                $(
    "#MyTable tr:last").after(myRow);

            }

        </
    script>
    </
    head>

    <
    body>
    <
    table id="MyTable" border="0" cellpadding="0" cellspacing="0">
            <
    tr>
                <
    td>
                    
    A
                
    <td>
                <
    td>
                    
    1
                
    <td>
            <
    tr>

            <
    tr>
                <
    td>
                    
    B
                
    <td>

                <
    td>
                    
    2
                
    <td>
            <
    tr>
     <
    table>
        
         <
    div onclick="addRow()" style="color: Blue; text-decoration: underline;">
            
    Add row to table
        
    </div>
    </
    body>


    </
    html

  • #2
    Do I understand you correctly? Your table has two cells in each row. Therefore IMO you will need two input boxes and an insert button.
    Last edited by Sempervivum; Sep 22, 2016, 03:46 AM.

    Comment

    Working...
    X