if (Modernizr.inputtypes.date) { $(':input[type="date"]').each(function () { this.type = "text"; //sorry, html5 input date is awkward }); }
<output> for output of calculations. Just like a span, really. In IE it is not self closing; Chrome and FF don't mind.
Chrome and IE triggers validation on submit. Firefox triggers pattern/email/url on change. To make IE/Chrome trigger on change, use this script (doing something other than set red borders!)
$("input").change(function () { $(this).parent().css("border", "0"); //does this use html5 data constraints? if (!this.willValidate) return; //check if it is valid if (this.checkValidity()) return; //individual errors: validity.valueMissing, validityTypeMismatch etc $(this).parent().css("border", "1px solid red"); });