I need to create a function to allow numbers dot and comma. So anyone corrects the following function
function on(evt) { var theEvent = evt || window.event
Your regex is incorrect.
var regex = /^[0-9.,]+$/;
Regex javascript, why dot and comma are matching for \
https://stackoverflow.com/tags/regex/info