Change (Rename) Table header cell value in jQuery

Last Reply 7 months ago By dharmendr

Posted 7 months ago

How to change the table header cell value in jquery 

Posted 7 months ago

Hi sathya2496,

Check this example. Now please take its reference and correct your code.


<html xmlns="">
    <script type="text/javascript" src=""></script>
    <script type="text/javascript">
        $(function () {
            $('#btnChage').on('click', function () {
                $('#tblCustomers tr').eq(0).find('th').eq(1).html('Contact Name');
    <table id="tblCustomers" border="1" cellpadding="1" cellspacing="0">
            <td>John Hammond</td>
            <td>United States</td>
            <td>Mudassar Khan</td>
            <td>Suzanne Mathews</td>
            <td>Robert Schidner</td>
    </table><br />
    <input id="btnChage" type="button" value="Change Header Text" />