January 13, 200620 yr Hi, I need a little help,I'm not very good in programming tho (My one of the serious attempt:P)How do I aplly only numbers? (max. 10)if (document.formulier.telefoonnummer.value == "") { document.getElementById('telefoonnummer').innerHTML = "please insert your phonenumber"; document.getElementById('8').innerHTML = "!";}else{if (document.formulier.telefoonnummer.value.length < 10) { document.getElementById('telefoonnummer').innerHTML = "please insert a valid phonenumber!"; document.getElementById('8').innerHTML = "!";What shall I do?Thanks and sorry for bad English
January 13, 200620 yr Check out this page for your reference.I think it has what you need to accomplish your needs.Advanced JavaScript StuffYou might want to use the parseInt() and isNaN() functions or whatever you call them inorder to check if it is a number or not.andif your numbers, since its a phone number, might include hiphens "-" and / or "(", ")" inside them, use the str.replace() function to accomplish it.Have Fun!
Create an account or sign in to comment