<script type="text/javascript">
var mystr="Hello World!";
var l1='World!'.length;
var l2 = 'Hello'.length;
var s1 = mystr.indexOf('World!');
var s2 = mystr.indexOf('Hello');
document.write(mystr.substr(s1,l1)+ "<br />");
document.write(mystr.substr(s2,l2));
</script>
举报
0/150
提交
取消