回答編集履歴
1
微調整
test
CHANGED
@@ -4,7 +4,8 @@
|
|
4
4
|
```javascript
|
5
5
|
<script>
|
6
6
|
function buttonClicked(){
|
7
|
+
if(document.querySelector('#myfile')) myfile.remove();
|
7
|
-
|
8
|
+
const fileElement = document.createElement("input");
|
8
9
|
fileElement.type="file";
|
9
10
|
fileElement.id="myfile";
|
10
11
|
fileElement.setAttribute('hidden',1);
|
@@ -18,5 +19,6 @@
|
|
18
19
|
</script>
|
19
20
|
<input type="button" value="btn" onclick="buttonClicked()">
|
20
21
|
```
|
22
|
+
※微調整
|
21
23
|
|
22
24
|
- [過去の質問:55348](https://teratail.com/questions/55348)
|