My Requirement is to validate the ip ranges, I need to create a JavaScript function to accept only numeric and it must allow only between the range 0 to 255. If anything is ente
A function like this should do it:
function allownums(value){ var num = parseInt(value,10); if(num <0 || num>255) alert('invalid') }
Then have your html look like:
Live example: http://jsfiddle.net/USL3E/