gpt4 book ai didi

php - 为什么html的input标签中的多个属性不起作用?

转载 作者:行者123 更新时间:2023-12-02 20:22:44 26 4
gpt4 key购买 nike

我似乎无法在我的输入中使用多个标签。我正在尝试拍摄多张照片,稍后将其纳入健康和安全表格中。目前我能做的就是拍一张照片。

我怎么用错了。我知道它可以与 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>

最佳答案

需要这样

   <form action="/action_page.php"  method="POST" enctype="multipart/form-data">

Take photos: <input type="file" name="files[]" type="file" multiple="multiple" accept="image/*" capture="camera" multiple><br>
<input type="submit">
</form>

关于php - 为什么html的input标签中的多个属性不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50939638/

26 4 0