//字符倒序 var str = "abcde"; var nStr = ""; for(var i = 0;i<str.length;i++){ var s = str.charAt(str.length-i-1) nStr += s; } document.write(nStr + "<br/>");