回答編集履歴

1

調整

2019/03/15 04:48

投稿

yambejp
yambejp

スコア114747

test CHANGED
@@ -32,9 +32,13 @@
32
32
 
33
33
  t.value="";
34
34
 
35
+ $("#img1").prop("src", "");
36
+
35
37
  e.preventDefault();
36
38
 
37
39
  }else{
40
+
41
+ $('#error').text("");
38
42
 
39
43
  var blob=new Blob([file],{type:type});
40
44
 
@@ -48,7 +52,7 @@
48
52
 
49
53
  });
50
54
 
51
- $('#submit').click(function(e){
55
+ $('#f1').on('submit',function(e){
52
56
 
53
57
  if($('#myfile').val()===""){
54
58
 
@@ -70,7 +74,7 @@
70
74
 
71
75
  </div>
72
76
 
73
- <form method="post" enctype="multipart/form-data">
77
+ <form id="f1" method="post" enctype="multipart/form-data">
74
78
 
75
79
  <img id = 'img1' style="width:300px;height:300px;">
76
80
 
@@ -86,4 +90,6 @@
86
90
 
87
91
 
88
92
 
93
+
94
+
89
95
  ```