我试图验证我的XHTML 1.0,但我有2个错误,无论如何我无法解决这个问题。有人可以看看它,如果有的话,提供替代品吗?当我改变电子邮件'文本我的JS停止工作。
Line 49, Column 58: there is no attribute "required"
…id="first-name" type="text" required="required" onkeypress="return onlyAlphab…
Error Line 63, Column 41: value of attribute "type" cannot be "email"; must be one of "text", "password", "checkbox", "radio", "submit", "reset", "file", "hidden", "image", "button"
答案 0 :(得分:1)
"required"
属性和"type=email"
带有 HTML5 ,您的文档使用xhtml 1.0严格。
你可以:
<!DOCTYPE html>
或
答案 1 :(得分:0)
XHTML没有类型为input
的{{1}}且没有表单验证,因此email
不存在。这些元素是在HTML5中添加的