[英]Can Input in only one input field in my HTML Form
I've created an HTML form in which I can add date and attendance. 我创建了一个HTML表单,可以在其中添加日期和出勤。 I've used a table to implement it. 我使用了一个表格来实现它。 The code works fine in Google Chrome but in any other browser, I can only add a date on the first date field. 该代码在Google Chrome浏览器中工作正常,但在其他任何浏览器中,我只能在第一个日期字段中添加日期。 If I click on other date fields even then, the first date field is selected. 如果仍然单击其他日期字段,则选择第一个日期字段。 Here is my code. 这是我的代码。 Where is the problem? 问题出在哪儿?
<table> <tr> <th>Date</th> <th>Attendance</th> </tr> <tr> <td><input type="date" name="date4" id="date4"></td> <td><input type="text" name="atd4" id="atd4"></td> </tr> <tr> <td><input type="date" name="date5" id="date5"></td> <td><input type="text" name="atd5" id="atd5"></td> </tr> <tr> <td><input type="date" name="date6" id="date6"></td> <td><input type="text" name="atd6" id="atd6"></td> </tr> <tr> <td><input type="date" name="date7" id="date7"></td> <td><input type="text" name="atd7" id="atd7"></td> </tr> <tr> <td><input type="date" name="date8" id="date8"></td> <td><input type="text" name="atd8" id="atd8"></td> </tr> </table>
Without script input elements with type="date" do not show as any date field/calendar in Firefox or in IE 11 and earlier versions. 如果没有类型为“ date”的脚本输入元素,则在Firefox或IE 11及更早版本中不会显示为任何日期字段/日历。
Here is a fix with scripts 这是脚本的修复
Only following browser versions will support date
and time
input type 仅以下浏览器版本支持date
和time
输入类型
Please refer input date time 请参考输入日期时间
The date
picker isn't supported by all browsers. 并非所有浏览器都支持date
选择器。 See this 看到这个
You can refer to this link for a workaround: Date input not working in firefox 您可以参考此链接获取解决方法: 日期输入在Firefox中不起作用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.