Skip to content

Instantly share code, notes, and snippets.

View joseusa192's full-sized avatar

joseusa192 joseusa192

View GitHub Profile
@Javlopez
Javlopez / filter.html
Created April 27, 2011 17:46
Solo numeros con 1 punto y maximo dos decimales
<script type="text/javascript">
<!--
function filterFloat(evt,input){
// Backspace = 8, Enter = 13, ‘0′ = 48, ‘9′ = 57, ‘.’ = 46, ‘-’ = 43
var key = window.Event ? evt.which : evt.keyCode;
var chark = String.fromCharCode(key);
var tempValue = input.value+chark;
if(key >= 48 && key <= 57){
if(filter(tempValue)=== false){
return false;