Google+

Sunday, May 15, 2011

Check Special Characters in String using JavaScript


Check Special Characters in String using JavaScript


Sometimes situation arises when you want to check for special characters in a string. But in JavaScript there is no direct methods that can check for Special Characters. To achieve this will have to use the JavaScript programming to develop an code that will perform the job of checking for special characters. The main part that perform this operation are the for loop construct and the indexOf method in JavaScript.
Here data is collection of character that contain special characters like:-
  var data =" 123,abc@aw$opjk";


0 comments:

Post a Comment