As the title says, which function will give me a result similar to what .substr() does, only for integers?
Thanks!
UPDATE:
Here is what isn’t working:
if ($(#itemname).val() == "Not Listed") {
var randVal = Math.random() * 10238946;
var newVal = randVal.toString().substr(0, 4);
$("#js_itemid").val(randVal);
$("#js_price").val("199.99");
}
What about …
… ?