bouffeatulm/misc/modif.js

26 lines
455 B
JavaScript
Raw Normal View History

2013-07-28 14:56:18 +02:00
function invites()
{
var invites_input = document.getElementById('invites');
var invites_label = document.getElementById('invites_label');
invites_input.onkeyup = function ()
{
if(invites_input.value > 1)
{
invites_label.innerHTML = 'invités';
}
if(invites_input.value <= 1)
{
invites_label.innerHTML = 'invité';
}
};
}
if(document.getElementById && document.createTextNode)
{
window.onload = function()
{
invites();
};
}