【发布时间】:2018-11-29 01:56:02
【问题描述】:
我似乎无法让多个标签在我的输入中起作用。我正在尝试拍摄多张照片,这些照片稍后将被纳入健康和安全表格。目前我能做的就是拍一张照片。
我是如何错误地使用它的。我知道它可以与 type="file" 一起使用。我希望这是一个简单的语法错误
<!DOCTYPE html>
<html>
<body>
<h2>The multiple Attributes</h2>
<p>The multiple attribute specifies that the user is allowed to enter more than one value in the input element.</p>
<form action="/action_page.php">
Take photos: <input type="file" accept="image/*" capture="camera" multiple><br>
<input type="submit">
</form>
<p>I wonder how I can take more than one photo.</p>
<p><strong>Note:</strong> The multiple attribute of the input tag is not supported in Internet Explorer 9 and earlier versions.</p>
</body>
</html>
【问题讨论】:
-
定义“不工作”。您收到错误消息吗?
-
在这里为我工作 - codepen.io/jainshravan123/pen/WyMXEe
-
当我拍照时,照片的文件名出现在“选择文件”按钮旁边。当我拍摄另一张照片时,它会被覆盖。所以我添加了更多 标签(每张照片 1 个),现在它正在工作并上传照片。现在我要么将其限制为多张照片,要么通过实时添加线条来更改它。我还需要看看如何在上传之前预览照片。 (不一定要编辑,只是为了预览)。