hi
try like this javascript. it helps you...
<html>
<head>
<script language="Javascript">
<!--
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode != 46 && charCode > 31
&& (charCode < 48 || charCode > 57))
return false;
return true;
}
</script>
</head>
<body>
<input id="txtChar" onkeypress="return isNumberKey(event)">
type="text" name="txtChar">
</input></body>
</html>
regards
sandeep