[html] Is it possible to change the content HTML5 alert messages?

Is it possible to control HTML5 alert messages? when adding 'required' to an input field.

because I want it to be specific and I don't want it's language to depend on the browsers.

<input id="answer" required> 

This question is related to html html5

The answer is


Thank you guys for the help,

When I asked at first I didn't think it's even possible, but after your answers I googled and found this amazing tutorial:

http://blog.thomaslebrun.net/2011/11/html-5-how-to-customize-the-error-message-for-a-required-field/#.UsNN1BYrh2M


Yes:

<input required title="Enter something OR ELSE." /> 

The title attribute will be used to notify the user of a problem.


You can use customValidity

$(function(){     var elements = document.getElementsByTagName("input");     for (var i = 0; i < elements.length; i++) {         elements[i].oninvalid = function(e) {             e.target.setCustomValidity("This can't be left blank!");         };     } }); 

I think that will work on at least Chrome and FF, I'm not sure about other browsers