These two lines ...
var reInt = /^\d+$/;
if (!reInt(document.getElementById("xx"))){alert("error");}
... work fine in Firefox but in Chrome give me 'object is not a function' for the second line. I don't think anything else is relevant. Just trying to test the input is integer.
Any ideas?
var reInt = /^\d+$/;
if (!reInt(document.getElementById("xx"))){alert("error");}
... work fine in Firefox but in Chrome give me 'object is not a function' for the second line. I don't think anything else is relevant. Just trying to test the input is integer.
Any ideas?