急,如何去掉最后一个字符javascript中 A=“dsfsd”; 我想得到A=“dsfs”,怎么办?[解决办法]var A= "dsfsd "; var str=A.substring(0,A.length-1); alert(str);