crackyourinterview.com


To improves our performance please Like Share Subscribe(Will boost us)

validation in jQuery to get only alphabets in textbox
Question Posted on 24 Apr 2013Home >> WEB >> JQuery >> validation in jQuery to get only alphabets in textbox

Below code will helps to apply validation on textbox which only accept alphabets not any numeric or special character

$(function ()
{
  $('#txtNumeric').keydown(function (e)
  {
   if (e.shiftKey || e.ctrlKey || e.altKey)
   {
    e.preventDefault();
   }
   else
   {
    var key = e.keyCode;
    if (!((key == 8) || (key == 32) || (key == 46) || (key >= 35 && key <= 40) || (key >= 65 && key <= 90)))
    {
     e.preventDefault();
    }
   }
  }
  );
});
0
0



.


Most Visited Questions:-

Deep Learning Questions Answers
Below are the different Deep Leaning Questions and answer a More...

Continuous Integration Questions Answers
Below are the 20 odd questions for CI or Continuous Integra More...

Derived relationships in Association Rule Mining are represented in the form of __________.
Derived relationships in Association Rule Mining are repres More...

What is Gulpjs and some multiple choice questions on Gulp
Gulpjs is an open source whihc helps in building Javascript More...

Microservices Architecture Questions Answers
Below are the different questions on Microservices Architec More...




Other Important Questions

Difference between body.onload and document.ready in jQuery

Different method which provides effects in JQuery

Three types of selector in JQuery

Example of JQuery focus event on textbox

What is significance of jQuery.NoConflict






@2014-2022 Crackyourinterview (All rights reserved)
Privacy Policy - Disclaimer - Sitemap