Tech Sharing Blog

Web, Tech, Tips, Download Blog…

Advertisement

Form validation not allow chinese cheractor

By David on January 14, 2010

the following example use the javascript regular express to validate the value where Chinese charecter is not allow.


<script   language=javascript>   
    
  function   checkChinese(){   
    
      var   re   =   /[u4E00-u9FA0]+/;   
    
      if   (re.test(form1.tjiccode.value))   
    
      {   
    
          alert(”不允许输入中文!”);   
    
  return   false;   
    
      }   
    
  }   

Popularity: 1% [?]



Related posts:

  1. Disabled certain key to be entered using javascript There is always the good way to prevent and verify...

  2. Trim a string in Javascript Trim is a good features when you try to...

  3. Attaching event in both MSIE and FF with Javascript Most of the developer who working in MS platform will...

  4. URL Hidden Tricks to check page’s last update Check the page’s last update date Go to any web...


Comments

No Responses to “Form validation not allow chinese cheractor”

Write a Comment

CommentLuv Enabled
SEO Powered by Platinum SEO from Techblissonline