<script>
var s=new String();
var s="Hello World";
alert(s.toLowerCase(s));//转小写
alert(s.toUpperCase(s));//转大写
alert(s.substring(3,8));//从第3个位置截取到第8个位置
alert(s.substr(3,8));//从第三个位置开始截取,截取8个字符长度
alert(s.indexOf("World"));//Wodld第一次出现时的位置,没有的话就返回-1;
alert(s.lastIndexOf("o"));//o在字符串中最后一次出现的位置;
</script>