最佳答案
如果你想要像图片中那样的默认 html5 警报,你需要:
- 1。通过执行 at the top of the page
- 2. Add the required attribute to the input
to add it do this:
<input type="text" required>
确保您指定它是 html5
这应该可行
关于javascript - 如何在表单中的字段下方创建警报?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41753385/