stringObject.substr(start,length)
<script type="text/javascript"> var str="Hello world!" document.write(
str.substr(3)
) </script>输出:
lo world!
<script type="text/javascript"> var str="Hello world!" document.write(str.substr(3,7)
) </script>输出:
lo worl
注意:
window.location.search.substr(1);这个是截取第一个 以后的包括下标是1的那个字符直到最后!