回答編集履歴
1
追記
test
CHANGED
@@ -33,3 +33,35 @@
|
|
33
33
|
|
34
34
|
|
35
35
|
```
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
# 追記
|
40
|
+
|
41
|
+
jQueryナシ版
|
42
|
+
|
43
|
+
```javascript
|
44
|
+
|
45
|
+
<script>
|
46
|
+
|
47
|
+
document.addEventListener('click',function(e){
|
48
|
+
|
49
|
+
var t=e.target;
|
50
|
+
|
51
|
+
if(t.className.match(/(^| )douteki(?: |$)/)){
|
52
|
+
|
53
|
+
t.style.backgroundColor='#000000';
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
});
|
58
|
+
|
59
|
+
</script>
|
60
|
+
|
61
|
+
<input type = 'button' id='id1' value='aaa' class='douteki'>
|
62
|
+
|
63
|
+
<input type = 'button' id='id2' value='bbb' class='douteki'>
|
64
|
+
|
65
|
+
<input type = 'button' id='id3' value='ccc' class='douteki'>
|
66
|
+
|
67
|
+
```
|