1
This is my job
<script>
    function keypressed(obj, e) {
        var tecla = (window.event) ? e.keyCode : e.which;
        var texto = document.getElementById("numeros").value
        var indexvir = texto.indexOf(",")
        var indexpon = texto.indexOf(".")
        if (tecla == 8 || tecla == 0)
            return true;
        if (tecla != 44 && tecla != 46 && tecla < 48 || tecla > 57)
            return false;
        if (tecla == 44) { if (indexvir !== -1 || indexpon !== -1) { return false } }
        if (tecla == 46) { if (indexvir !== -1 || indexpon !== -1) { return false } }
    }
</script>
How can I call you in mine TextBox?
Note: I can get it on an html page like this: <input type="text"id="numbers"value=""onkeypress="returnkeypressed( this , Event );"/> But I can’t get it on an Asp.net. what may be going on?
– markim
This ASP.NET is Webforms or MVC?
– novic