Archive for avril 2005
Reconnaitre un numéro de sécurité sociale
Trouvé sur http://u-blog.net/dda/note/11 où tout est expliqué.
([12][0-9][0-9](0[1-9]|1[0-2])(0[1-9]|[13456789][0-9]|2[023456789AB])[0-9][0-9][0-9][0-9][0-9][0-9])([0-9][0-9])
(publié à l’origine sur http://www.bigbold.com/snippets/posts/show/170)
Confirmer la sortie d’un formulaire
Cette méthode fonctionne avec Internet Explorer (testé avec IE6) et Firefox (testé avec FF 1.5)
window.onbeforeunload = function (evt) {
var message = 'Are you sure you want to leave?';
if (typeof evt == 'undefined') {
evt = window.event;
}
if (evt) {
evt.returnValue = message;
}
return message;
}
(publié à l’origine sur http://www.bigbold.com/snippets/posts/show/142)