简体   繁体   English

如何在 HTML5 表单必填属性上设置验证消息的时间?

[英]How set time for validation message on HTML5 form required attribute?

I am using HTML5. On form validation, the message will be shown for about 5 seconds.我正在使用 HTML5。在表单验证时,该消息将显示约 5 秒。 How to change it to be visible for 10 seconds?如何将其更改为可见 10 秒?

 <form> <input name="name" required /> <input type="submit" value="Submit"/> </form>

The UI is implemented by the browser and isn't customisable. UI 由浏览器实现,不可自定义。 Different browsers will implement it differently.不同的浏览器会以不同的方式实现它。 (eg when I test it, the message is displayed until I interact with the page again). (例如,当我测试它时,该消息会一直显示,直到我再次与该页面交互)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM