﻿function InputSoloNumeri(vnt)
{
    var tasto,carattereTasto;
    if (window.event) //Modello ad eventi IE
        tasto = window.event.keyCode;
    else
        if (vnt) //Modello ad eventi NN
            tasto = vnt.which;
        else
            return true;

    carattereTasto = String.fromCharCode(tasto);

    // verifica tasti particolari tipo canc, invio, ...
    if ((tasto==null) || (tasto==0) || (tasto==8) ||(tasto==9) || (tasto==13) || (tasto==27))
        return true;
    else
        if ((("0123456789").indexOf(carattereTasto) > -1)){
            window.status = "";
            return true;
        }
        else{
            window.status = "Il campo accetta solo numeri";
            return false;
        }
}
