159
rated 0 times
[
160]
[
1]
/ answers: 1 / hits: 36430
/ 14 Years ago, thu, september 16, 2010, 12:00:00
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);
}
More From » javascript