lundi 5 novembre 2018

Export only selected rows (checked checkboxes) to Excel

I need to create a function that exports only the selected checkboxes to an Excel document. Also, when I check the checkbox that is in the <thead>, all the checkboxes must become checked.

<table>
    <thead>
        <tr>
            <th><input class="checkMe" type="checkbox"></th>
            <th>Firstname</th>
            <th>Lastname</th>
            <th>Phone number</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><input class="checkMe" type="checkbox"></td>
            <td>John</td>
            <td>Doe</td>
            <td>8753125</td>
        </tr>
        <tr>
            <td><input class="checkMe" type="checkbox"></td>
            <td>Mary</td>
            <td>Thomson</td>
            <td>1240912</td>
        </tr>
        <tr>
            <td><input class="checkMe" type="checkbox"></td>
            <td>Phill</td>
            <td>Johnson</td>
            <td>8971412</td>
        </tr>
    </tbody>
</table>

Thank you!




Aucun commentaire:

Enregistrer un commentaire