I would like to ask you about something that does not work for me ? If you could help me please.
Html:
Function can't be a function name. In your HTML, change function(id, e) into, say, inputKeypress(id, e), or any other name you see fit.
function(id, e)
inputKeypress(id, e)
In your JavaScript, declare he function like so:
function inputKeypress(id, e) { do stuff }