質問編集履歴
3
質問内容の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
<form id="form">
|
10
10
|
|
11
11
|
<input type="number" required>
|
12
|
+
|
13
|
+
|
12
14
|
|
13
15
|
</form>
|
14
16
|
|
@@ -41,3 +43,21 @@
|
|
41
43
|
HTML5 のバリデーション表示が発生しません
|
42
44
|
|
43
45
|
JS から submit イベントを起こした場合にもバリデーションを表示させる方法はないですか?
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
追記:
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
```
|
56
|
+
|
57
|
+
<input type="submit" name="commit" value="OK" class="button">
|
58
|
+
|
59
|
+
```
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
ためしにフォームの中にサブミットボタンを追加してみましたがこちらのボタンを押したところバリデーションメッセージがでます
|
2
質問内容の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
<input type="number" required>
|
12
12
|
|
13
|
-
<form>
|
13
|
+
</form>
|
14
14
|
|
15
15
|
</div>
|
16
16
|
|
1
質問内容の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
<button type="button">OK</button>
|
19
|
+
<button id="submit" type="button">OK</button>
|
20
20
|
|
21
21
|
```
|
22
22
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
```
|
30
30
|
|
31
|
-
$('#
|
31
|
+
$('#submit').on('click', () => {
|
32
32
|
|
33
33
|
$('#form').submit();
|
34
34
|
|