我想在html5中设置必填字段的消息提示
<html lang="en">
<input type="email" required="required" />
消息提示继续以法语标记。我不知道哪个变量导致浏览器选择任何语言。
没有办法顺利处理html5交互语言(没有JS)吗?我希望lang
attr 就足够了...
我想在html5中设置必填字段的消息提示
<html lang="en">
<input type="email" required="required" />
消息提示继续以法语标记。我不知道哪个变量导致浏览器选择任何语言。
没有办法顺利处理html5交互语言(没有JS)吗?我希望lang
attr 就足够了...
Had the same problem
Actually, you shoud use JS to achieve that. On another hand, you could recompile your browser from source and change manually texts that are not in your desired language if you absolutely do not want to use JS.
Yes, you should use
setCustomValidity("Votre Custom Mensaje Naturlish");
whithin an oninvalid
handler function attached to the input element.
Something like:
<input type="email" oninvalid="handlerToCall(this)" required="required" />
Here you'll find answers that are valid and do work for what you want to do. Try the jsfiddle live examples and you'll see for yourself :)