使用Opera和Safari进行HTML5验证

Mar*_*opa 7 safari validation html5 opera css3

我在Opera和Safari上的HTML5验证有问题.

在Opera中,消息气泡不显示任何文本,而在safari中,当我按下提交按钮时不会发生验证.在IE,Mozilla或Chrome中,验证工作正常.谁能说出为什么会这样?

我在表单中的输入具有html5标准验证,具有必需属性,就是这样.

我试图在网络上搜索这个主题,但没有设法找到它.

请帮我.

谢谢

    <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>
Run Code Online (Sandbox Code Playgroud)

Ans*_*elm 8

这是Opera中一个奇怪的错误:使用@ font-face web字体时不会显示该消息.我也遇到过这个问题.选择像Arial这样的普通字体,会显示消息.Safari不支持html5验证(safari有部分支持,但没有验证泡泡).我的提示是:使用webshims lib(http://afarkas.github.io/webshim/demos/) - 很好的polyfill用于验证等许多功能.