回答編集履歴
1
chousei
test
CHANGED
@@ -1 +1,25 @@
|
|
1
1
|
複数のHTMLタグに同じIDをふることはできません
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
```javascript
|
6
|
+
|
7
|
+
<script>
|
8
|
+
|
9
|
+
$(function(){
|
10
|
+
|
11
|
+
var names=$('[name]').map(function(){return $(this).attr('name');}).get();
|
12
|
+
|
13
|
+
console.log(names);
|
14
|
+
|
15
|
+
});
|
16
|
+
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<input type="checkbox" name="c1">
|
20
|
+
|
21
|
+
<input type="checkbox" name="c2">
|
22
|
+
|
23
|
+
<input type="checkbox" name="c3">
|
24
|
+
|
25
|
+
```
|