lundi 21 décembre 2015

Call value onclick checkbox Javascript

I need to improve onclick function for checkbox. When click the checkbox contenteditable cell should be crossed . How can I do this? Thanks for all response.
My simple code following as like:

<!DOCTYPE html>
<html>
<head>

<style>
     table {
        border-collapse: collapse;
        margin: 100px;
    }
    table, td, th {
        border: 1px solid black;
        padding: 10px;
    }
        table td.crossed {
            background-image: linear-gradient(to bottom right, transparent calc(50% - 1px), red, transparent calc(50% + 1px));
        }
</style>
</head>
<body>
  <table id="t1">
    <tr>
        <th></th>
        <th></th>
        <th></th>
        <th></th>
    </tr>
    <tr>
        <td>1.</td>
        <td>
            <input type="checkbox">
        </td>
        <td>
            <input type="date" id="mydate">
        </td>
            <td contenteditable='true'></td>
    </tr>
</table>

 <script> 

</script>
</body>
</html>

There should be like this picture




Aucun commentaire:

Enregistrer un commentaire