Home I have a text field, which will accept only the NEXT TO NEXT ALPHANUMERIC that is single alphabet next is single numeric FOR EXAMPLE:- s3f4G5A2s3
Reply: 0

I have a text field, which will accept only the NEXT TO NEXT ALPHANUMERIC that is single alphabet next is single numeric FOR EXAMPLE:- s3f4G5A2s3

user531
1#
user531 Published in June 20, 2018, 7:38 am

javascript:

script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"

$(document).ready(function()

{

$(function(){

$('#custom_Expression').keypress(function(e){

var txt = String.fromCharCode(e.which);

console.log(txt + ' : ' + e.which);

if(!txt.match(/^([a-zA-Z][0-9]){3}$/g))

            {
                return false;
            }
        });
});

input type="text" id="custom_expression"

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.406047 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO