求解大神!
<script?type="text/javascript"> ??var?str="I?love?JavaScript!" ??document.write(str.indexOf("I")?+?"<br?/>"); ??document.write(str.indexOf("v")?+?"<br?/>"); ?; </script>
document.write(str.indexOf("v",8));這一串是什么意思?
<script?type="text/javascript"> ??var?str="I?love?JavaScript!" ??document.write(str.indexOf("I")?+?"<br?/>"); ??document.write(str.indexOf("v")?+?"<br?/>"); ?; </script>
document.write(str.indexOf("v",8));這一串是什么意思?
2019-11-03
舉報
2019-11-13
從字符串中索引為“8”的那個字符開始檢索子串”v“,注意字符串下標從0開始,也即從第9個字符開始檢索。
2019-11-04
從字符串的第9個位置開始查找字符串“v”首次出現的位置。