/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function isSpclChar(comments) { var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?"; var cnt=0; for (var i = 0; i < comments.length; i++) { if (iChars.indexOf(comments.charAt(i)) != -1) { cnt=cnt+1; } } if(cnt==comments.length) return false; else return true; }
Comments
