js中indexOf()函数使用问题
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>string对象 </title>
<script type="text/javascript">
var mystr="Hello World!"
document.write(mystr.indexOf("o",mystr.indexOf("o")+1));//结果返回7
// document.write(mystr.indexOf("o",mystr.indexOf("o"))); 结果返回4,Why?
</script>
</head>
<body>
</body>
</html>