html - Control input hint -
some browsers provide hint user input field based on type of input, e.g. here type="email":
<input accesskey="e" name="email" id="email" type="email" required> chrome:
firefox:
my questions are:
- are these part of spec?
- is there way control message (the message , disable/enable it)?
- is there way style tooltip?
this solution mozilla
var email = document.getelementbyid("mail"); email.addeventlistener("input", function (event) { if (email.validity.typemismatch) { email.setcustomvalidity("i expect e-mail, darling!"); } else { email.setcustomvalidity(""); } }); 

Comments
Post a Comment