|
|
Question : isnumeric in asp/javascript
|
|
hey folks
i usually ocde in ASP/VBscript but am taking over an ASP/Javascript site from someone.
i need to check if an input is a number. usually i would use isnumeric(value) but how is this done in server side javascript?
thanks!
|
Answer : isnumeric in asp/javascript
|
|
function isnumeric(val) { return /^\d+$/.test(val); }
|
|
|
|