javascript首尾反转字符

var my_str="Welcome to www.sharejs.com"
var i=my_str.length;
i=i-1;
for (var x = i; x >=0; x--)
{
document.write(my_str.charAt(x));
}
原文地址:https://www.cnblogs.com/sprinng/p/5165155.html