<script type="text/javascript">
var str = "abcdefg";
document.write(str.split("").reverse().join(""));
</script>
<script type="text/javascript">
var str = "abcdefg";
document.write(str.split("").reverse().join(""));
</script>
转载于:https://www.cnblogs.com/qinxuemei/p/3967288.html