質問編集履歴
6
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-06-22/234f2482-ead7-4be5-a069-af1275b201bc.png)
|
2
2
|
```html
|
3
|
+
<!-- modal open -->
|
4
|
+
<a class="js-modal-open" href="" data-target="modal01">モーダルウィンドウを開く</a>
|
5
|
+
<!-- ./modal open -->
|
6
|
+
<p>HELLO</p>
|
7
|
+
<div id="test"></div>
|
8
|
+
<div id="test2"></div>
|
3
9
|
<!-- modal -->
|
4
10
|
<div id="modal01" class="c-modal js-modal">
|
5
11
|
<!--<form role="form" action="" method="post">-->
|
5
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-06-22/234f2482-ead7-4be5-a069-af1275b201bc.png)
|
1
|
+
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-06-22/234f2482-ead7-4be5-a069-af1275b201bc.png)
|
2
|
+
```html
|
2
3
|
<!-- modal -->
|
3
4
|
<div id="modal01" class="c-modal js-modal">
|
4
5
|
<!--<form role="form" action="" method="post">-->
|
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
```html
|
1
|
+
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-06-22/234f2482-ead7-4be5-a069-af1275b201bc.png)```html
|
2
2
|
<!-- modal -->
|
3
3
|
<div id="modal01" class="c-modal js-modal">
|
4
4
|
<!--<form role="form" action="" method="post">-->
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,11 +1,31 @@
|
|
1
1
|
```html
|
2
|
+
<!-- modal -->
|
3
|
+
<div id="modal01" class="c-modal js-modal">
|
4
|
+
<!--<form role="form" action="" method="post">-->
|
5
|
+
<div class="c-modal_bg js-modal-close"></div>
|
6
|
+
<div class="c-modal_content _lg">
|
7
|
+
<div class="c-modal_content_inner">
|
8
|
+
<!--ここにモーダルウィンドウの内容が入ります-->
|
9
|
+
|
10
|
+
<br>予算
|
11
|
+
<input type="text" id="yosan" name="yosan">円
|
12
|
+
|
2
|
-
<p>
|
13
|
+
<p>
|
3
|
-
<input type="checkbox" name="shopping" id="c1" value="お肉">お肉
|
14
|
+
<input type="checkbox" name="shopping" id="c1" value="お肉">お肉
|
4
|
-
<input type="checkbox" name="shopping" id="c2" value="魚">魚
|
15
|
+
<input type="checkbox" name="shopping" id="c2" value="魚">魚
|
5
|
-
<input type="checkbox" name="shopping" id="c3" value="卵">卵
|
16
|
+
<input type="checkbox" name="shopping" id="c3" value="卵">卵
|
6
|
-
<input type="checkbox" name="eating" id="c4" value="芋">芋
|
17
|
+
<input type="checkbox" name="eating" id="c4" value="芋">芋
|
7
|
-
</p>
|
18
|
+
</p>
|
19
|
+
|
20
|
+
<p><input type="button" id="button5" value="全ONボタン" /></p>
|
21
|
+
<p><input type="button" id="button6" value="全OFFボタン" /></p>
|
22
|
+
|
23
|
+
<a class="js-modal-close c-modal_close" href="">
|
24
|
+
<br>閉じる
|
25
|
+
</a>
|
8
|
-
<button type="submit" class="btn btn-primary" id="chgDateSub" name="soushin" value="dateup">送信する</button>
|
26
|
+
<button type="submit" class="btn btn-primary" id="chgDateSub" name="soushin" value="dateup">送信する</button>
|
27
|
+
</div>
|
28
|
+
</div>
|
9
29
|
```
|
10
30
|
```jquery
|
11
31
|
$('#chgDateSub').on('click', function() {
|
2
追加ぶん
test
CHANGED
File without changes
|
test
CHANGED
@@ -17,5 +17,5 @@
|
|
17
17
|
```
|
18
18
|
モーダルウィンドウをしています。
|
19
19
|
モーダルウィンドウにチェックボックスは入っています。そこで"お肉"、"魚"、"卵"、"芋"それぞれチェックして送信ボタンを押すと本文の方にそれぞれお肉、魚など表示させたいです。
|
20
|
-
今このコードだと本文にお肉魚など表示されますが、モーダルウィンドウの方にもお肉魚と表示されてしまいます。どこを修正したらよろしいでしょうか
|
20
|
+
今このコードだと本文にお肉魚など表示されますが、モーダルウィンドウの方にもお肉魚と表示されてしまいます。本文にのみ表示させたいです。どこを修正したらよろしいでしょうか
|
21
21
|
|
1
ごじ
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
送信ボタンを押下するとチェック
|
1
|
+
送信ボタンを押下するとチェックを入れたものだけ本文に表示
|
test
CHANGED
File without changes
|