質問編集履歴
3
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
```
|
10
10
|
追記(ブラウザ上のHTML)
|
11
11
|
```HTML
|
12
|
-
<table id="RadioButtonList1" name="
|
12
|
+
<table id="RadioButtonList1" name="radiolist1">
|
13
13
|
<tbody>
|
14
14
|
<tr>
|
15
15
|
<td>
|
2
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,6 +7,26 @@
|
|
7
7
|
<asp:ListItem>選択2</asp:ListItem>
|
8
8
|
</asp:RadioButtonList>
|
9
9
|
```
|
10
|
+
追記(ブラウザ上のHTML)
|
11
|
+
```HTML
|
12
|
+
<table id="RadioButtonList1" name="radiobutton1">
|
13
|
+
<tbody>
|
14
|
+
<tr>
|
15
|
+
<td>
|
16
|
+
<input id="RadioButtonList1_0" type="radio" name="ct100$RadioButtonList1" value="選択1">
|
17
|
+
<label for="RadioButtonList1_0">選択1</label>
|
18
|
+
</td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<td>
|
22
|
+
<input id="RadioButtonList1_1" type="radio" name="ct100$RadioButtonList1" value="選択2">
|
23
|
+
<label for="RadioButtonList1_1">選択2</label>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
|
29
|
+
```
|
10
30
|
### 発生している問題
|
11
31
|
下記のように書いたのですが、チェック状態を取得することができていない状態です。
|
12
32
|
やり方が分からず検索したのですが、ヒットせず答えを導き出せていません。
|
1
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
ラジオボタンリストで何かしらの項目にチェックがついている場合、その状態を取得したい。
|
3
3
|
### 該当のソースコード
|
4
4
|
```HTML
|
5
|
-
<asp:RadioButtonList ID="
|
5
|
+
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
|
6
6
|
<asp:ListItem>選択1</asp:ListItem>
|
7
7
|
<asp:ListItem>選択2</asp:ListItem>
|
8
8
|
</asp:RadioButtonList>
|
@@ -12,7 +12,7 @@
|
|
12
12
|
やり方が分からず検索したのですが、ヒットせず答えを導き出せていません。
|
13
13
|
```jquery
|
14
14
|
var optnum = "";
|
15
|
-
if ($("#
|
15
|
+
if ($("#RadioButtonList1").checked == true) {
|
16
16
|
optnum = 1;
|
17
17
|
} else {
|
18
18
|
optnum = "";
|