How to Add Horizontal line in Javascript

Posted by user54197 on Stack Overflow See other posts from Stack Overflow or by user54197
Published on 2010-06-16T13:45:34Z Indexed on 2010/06/16 13:52 UTC
Read the original article Hit count: 219

Filed under:
|

I would like to add a horizontal seperating line on a dynamic populated table. How do I do this? Below is a snippet.

    function addNewRow() {
    $('#displayTable tr:last').after('<tr><td style="font-size:smaller;" class="dataField1"></td><td style="font-size:smaller;" class="dataField2"></td><td style="font-size:smaller;" class="dataField3"></td></tr>');
    var $tr = $('#displayTable tr:last');
        $tr.find('.dataField1').text($('#txtName').val());
        $tr.find('.dataField2').text($('#txtAddress').val());
        $tr.find('.dataField3').text('document.write("<tr><td colspan=\"2\"><hr \/><\/td><\/tr>");
    }

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery