<script> function isNum(obj){ var reg=new RegExp(/^(-)?[0-9]+(.[0-9]+)?$/); return reg.test(obj); } </script>