我在Opera和Safari上遇到了HTML5验证问题。在Opera中,消息泡不显示任何文本,在Safari中,当我按提交按钮时,验证不会发生。在IE、Mozilla或Chrome中,验证工作正常。有谁能告诉我为什么会这样呢?
我表单中的输入具有HTML5标准验证,带有required属性。
我试图在网上搜索这个主题,但没有找到结果。
请帮帮我。
谢谢。
我表单中的输入具有HTML5标准验证,带有required属性。
我试图在网上搜索这个主题,但没有找到结果。
请帮帮我。
谢谢。
<form class="sign-in-form" action="" method="post">
<li>
<label>
<span>Username</span>
<input placeholder="Please enter your username" name="username" type="text" tabindex="1" title="It must contain the username that you have chosen at registration" required autofocus>
</label>
</li>
<li>
<label>
<span>Password</span>
<input placeholder="Please enter your password" name="password" type="password" tabindex="2" title="It must contain the password that you have chosen at registration" required>
</label>
</li>
<li>
<button name="sign-in-btn" type="submit" id="sign-in-submit">Sign In</button>
</li>
</form>