prova anche con

Codice PHP:
alert(Math.max(1,2,3));