我正在文本区域和文本字段上的inputmode属性获得验证错误.验证器告诉我此时不允许元素输入使用Attribute inputmode,但是
the HTML5 spec indicates that it is allowed.
这段代码实际上有什么问题,还是验证器有错?
这是一个裸机的情况,它会产生这种验证错误(两次),一种是电子邮件输入,另一种是textarea.
<!DOCTYPE HTML> <html lang="en"> <head> <Meta charset="utf-8"> </head> <body> <form method="post" action="contactme.PHP"> <label class='pas block'> Your E-Mail:<br/> <input type='email' name='email' required inputmode='latin' placeholder='your e-mail here' /> </label> <label class='pas block'> Your Message:<br/> <textarea name='message' required inputmode='latin' placeholder='and your message here!'></textarea> </label> </form> </body> </html>
解决方法
HTML5规范说
The following content attributes must not be specified and do not apply to the element: accept,alt,checked,dirname,formaction,formenctype,formmethod,formnovalidate,formtarget,height,inputmode,max,min,src,step,and width.
原文地址:https://www.jb51.cc/html5/168583.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。