72
In light of the incorrect way to implement phone number fields on a website, I've created the correct way. A couple of questions, though.
Post Body
for (var i = 0; i < 9999; i ) {
var value = ("0000000000" i).substr(-10, 10).replace(/(\d{3})(\d{3})(\d{4})/, '$1-$2-$3');
$('#phone-number').append($('<option>', {
value: value,
text: value
}));
}
I've created a fiddle so that you can see it first hand:
https://jsfiddle.net/nt5whf83/
For some reason, when I increase the maximum phone number past 9999 (specifically, it should be 9999999999) it doesn't work. Thoughts or ideas?
THANK YOU
Author
Account Strength
100%
Account Age
17 years
Verified Email
Yes
Verified Flair
No
Total Karma
35,650
Link Karma
10,030
Comment Karma
25,059
Profile updated: 3 days ago
Posts updated: 5 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 8 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/shittyprogr...