Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


Atanu Paul
16 Digit
1 Answer(s)      3 years and 4 months ago
Posted in : JavaScript Questions


In a text box I can Only type A-Z & 1-10 upto 16 Digit.


Advertisement
View Answers

April 23, 2011 at 12:10 PM


<html>
<script>
function checkString(text) {
if(/[^A-Za-z\d ]/.test(text)){
alert('String should contain letters and numbers only!');
document.getElementById("st").value="";
return false;
}
if(text.length>16){
alert('You cannot exceeds the limit of 16 digits!');
document.getElementById("st").value="";
return false;
}
return true;
}
</script>
Enter Name:&nbsp&nbsp&nbsp<input type="text" id="st" onkeyup="checkString(this.value);">
</html>


Related Tutorials/Questions & Answers:
16 Digit
16 Digit  In a text box I can Only type A-Z & 1-10 upto 16 Digit...!'); document.getElementById("st").value=""; return false; } if(text.length>16){ alert('You cannot exceeds the limit of 16 digits!'); document.getElementById("st
calculate sum of individual digit
calculate sum of individual digit  Hi How to calculate product of first snd last digit of indiviual digit Like Num=23456 S=2*6
Advertisements
Digit Only text field
Digit Only text field  How should we accept digits only in a textbox? (using JSTL only, without Javascript
calculate sum of individual digit
calculate sum of individual digit   How calculate product of first and last digit of indiviual numbers Like a=43278 4*8=32
Check for character is letter or digit.
Description .style1 { background-color: #FFFFCC; } Description: This tutorial demonstrate how to check a character variable value is a digit or letter using isLetterOrDigit() method. Code
Check for character is digit or not.
Description: This tutorial demonstrate the use of Character.isDigit() method which checks whether the value stored in char data-type variable is digit or not. Code: public class CheckDigit 
Encode 5 digit zip code - Java Beginners
Encode 5 digit zip code  I have an assignment to read in a 5 digit zip code, sum the digits, and come up with the check digit. I then need to convert this to encode into a five digit bar code plus the check digit. In our book
population problem plz help me befor 16 March 2011 !!
population problem plz help me befor 16 March 2011 !!  the Q is : How can i count how many years it will take for the population of a town to go over 30.000 .. consider that it Increases 10% every year ?? And this is my code &
Check whether the sum of alternate digit of a number is palindrome or not.
Check whether the sum of alternate digit of a number is palindrome... are going to check whether the sum of the alternate digit of a number entered... of the alternate digits of number (like if a number is 23456, the sum of alternate digit
DateValidator in Flex4
DateValidator in Flex4: The DateValidator class validates the string and date format. You can enter the single or two digit for month and day. By default... range is a four digit number. The tag of DateValidator is <mx
Read a string and reverse it and then print in alphabetical order.
of characters) or a binary digit string (a sequence of binary values). In the example
Java Around the globe
Java Around the globe              Sun patches dangerous Java vulnerabilities Sun released Java SE 6 Update 2 on 16 July 2007
August 2007 Issue of Java Jazz up magazine
August 2007 Issue of Java Jazz up magazine           Java News Sun released Java SE 6 Update 2 on 16 July 2007 in the US, which the company said is no longer
Java Find Next Date Example
the Eclipse IDE and JDK 1.6. Example : Here I am giving a simple example which
JAVA JAZZ UP - Free online Java magazine
JAVA JAZZ UP - Free online Java magazine       Our this issue contains:  Java Jazz Up Issue 2 Index Java Around the Globe   Sun released Java SE 6 Update 2 on 16
What is KBPS?
in such a way that it can assess the only two digit. 0 and 1. All computer architecture
We are providing Downloadable Version of Mandrake 10.1 Community Edition Linux CD's.
Mandrake 10.1 Community Edition Linux Now Available Mandrake 10.1 Community Edition CD's Mandrake 10.1 Community, released in Sept. 16, 2004 is an incremental upgrade to Mandrake 10. The new features make it a worthy upgrade for home
Kerala with South India Tour
- Kochi Tour Package Duration: 16 Nights / 17 Days Day 01: Arrival.... Day 16: Marari Beach Tour Enjoy your day and indulge in the beach activities
Java programming
by 16 gets the second digit and so on. Write a method that accepts an array...Java programming  To make a fraction to a representation base 16 (i.e. hexadecimal) we can multiply it by 16, and the resultant integer part
credit card validation
credit card validation   Double every second digit from right to left. If doubling of a digit results in a two-digit number, add up the two digits to get a single-digit number. 2 * 2 = 4 2 * 2 = 4 4 * 2 = 8 1 * 2 = 2 6 * 2 = 12
programing
programing  write a program to input a number find & print the middle digit if no of digit are odd other wise print the average of middle two digit
Java..
Java..  Which data type can be used to store 10 lakh digit in a variable in java??????And also value should be retrieved digit by digit
Java ....
Java ....  Which data type can be used to store 10 lakh digit in a variable in java??????And also value should be retrieved digit by digit
java recursion
java recursion  Count of most occurring digit Find the digit that occurs most in a given number
strftime ()
representation of the day like from Sunday through Saturday %d - Two-digit day... on the locale (an alias of %b) from Jan through Dec %m Two digit representation... --- --- %C Two digit representation of the century (year divided by 100, truncated
Credit Card Validation - Java Beginners
. yet i dont know how to select the last digit of a credit card number strings (16 digits)from the right and add up other numbers on the left with the formula...: If the digit has an odd position, counting from the right, add it to the sum as-is. Thus
PHP GD graphical counter
("DIGIT_WIDTH", 12); define("DIGIT_HEIGHT", 13); $number... = ($t_digits * DIGIT_WIDTH) + 3; $height = DIGIT_HEIGHT + 3; $img... = 0; $i < $t_digits; $i++) { $cur_digit = (int)$number[$i]; $digit_offset
histogram
histogram  read 10 single digit value and display horizontal histogram
histogram
histogram  read 10 single digit value and display horizontal histogram
histogram
histogram  read 10 single digit value and display horizontal histogram
histogram
histogram  read 10 single digit value and display vertical histogram
using array
using array  read 10 digit number and display (star
Java Programming: Solution to Programming Exercise
= 16*dec + digit; } TextIO.putln("Base-10 value: " + dec...."); return; } dec = 16*dec + digit...; str.length(); i++ ) value = value*16 + hexValue( str.charAt(i
Credit Card Validation Application
digit (1st digit from left to right). The credit card number must start with: ... must be between 13 to 16 digits. In addition, your program should validate credit... 4388576018402626): Double every even digit from right to left. If the doubling
string to double
value) { int x = 0; int digit = 0; for (int i=0; i<...': digit = 0; break; case '1': digit = 1; break; case '2
HISTOGRAM
HISTOGRAM   read 10 singe digit value and disply HORIZONTAL HISTOGRAM
HISTOGRAM
HISTOGRAM   read 10 singe digit value and disply HORIZONTAL HISTOGRAM
using random number
using random number  generate 10 digit number and display the length of longest incresing swries
using switch,break and for loop
using switch,break and for loop  generate a 10 digit number and display the length of longest increasing series
using switch and break
using switch and break  generate a 10 digit number and display the length of longest increasing series
using random number
using random number  generate a 10 digit number using random number and display the length of longest increasing series
programing
programing  write a program to input a number or find & print the highest digit
programing
programing  write a program to input a number or find & print the highest digit
programing
programing  write a program to input a number or find & print the highest digit
java programing
java programing  write a program to input a number or find & print the highest digit
java question
java question  input any number and check if sum of alternate digit is palindrome
corejava - Java Beginners
corejava  how to write a program to multiply 1000 digit numbers with out using biginteger class
How to prompt user
, the 1st number entered as Digit 1 and 2nd number as Digit 2. b)Display the value of Digit 1 and Digit 2, indicating which is 1st & which is 2nd number. c)Multiply the value of Digit 1 by 2, sum the value of Digit 2 to it and store
java fundamental question
java fundamental question  equivalent to 16>>2 ? a) 16/4 b) 16/2 c) 16*2 d) 16/2^2
 

 

 

DMCA.com