-1
我需要改進複選框的onclick函數。當點擊複選框contenteditable
單元格應該是劃線。我怎樣才能做到這一點?感謝所有迴應。
我簡單的代碼如下像:調用值onclick複選框Javascript
<!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>
你的javascript代碼在哪裏? –