Simple javascript that allows you to check whether a given word / string is a Palindrome or not. A palindrome is a word or phrase which reads the same forward or reverse direction.
Features
Used to reverse the string and check the given word is palindrome or not.
The checker returns true or false upon comparision.
The script considers spaces, punctuation marks, upper and lower cases.
Preview
Downloads
Javascript Code
<!-- Script by hscripts.com --> <!-- More scripts @www.hscripts.com --> <script type="text/javascript"> function reverse_string(str){var stri = "";var alen = str.length;for (var i = alen ; i > 0 ; i--){stri += str.charAt(i-1)}return stri; } function palindrome(str){return (str == reverse_string(str)); } function palindrome_check(){var str = document.getElementById('inputstr').value; if(str!=""){document.getElementById('reversestr').value=reverse_string(str);document.getElementById('ispalin').value=palindrome(str);return true;}else alert ('Enter String'); } </script> <!-- Script by hscripts.com -->