回答編集履歴
1
chousei
test
CHANGED
@@ -27,3 +27,37 @@
|
|
27
27
|
</script>
|
28
28
|
|
29
29
|
```
|
30
|
+
|
31
|
+
# 追記
|
32
|
+
|
33
|
+
セルのみ背景変更
|
34
|
+
|
35
|
+
```javascript
|
36
|
+
|
37
|
+
<style>
|
38
|
+
|
39
|
+
td.active {
|
40
|
+
|
41
|
+
background-Color:yellow;
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
</style>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<script>
|
50
|
+
|
51
|
+
window.addEventListener('DOMContentLoaded', ()=>{
|
52
|
+
|
53
|
+
document.querySelectorAll('td').forEach(x=>{
|
54
|
+
|
55
|
+
if(/日$/.test(x.textContent)) x.classList.add('active');
|
56
|
+
|
57
|
+
});
|
58
|
+
|
59
|
+
});
|
60
|
+
|
61
|
+
</script>
|
62
|
+
|
63
|
+
```
|