var str="abcde"; var arr=str.split(""); arr=arr.reverse();//颠倒顺序 document.write("字符串颠倒后顺序: "+arr.join(""));