标答也太死了啊~~
<!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));
</script>
</head>
<body>
</body>
</html>
<!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));
</script>
</head>
<body>
</body>
</html>
2020-01-19
function daojishi()
{
var sn=document.getElementById("one").innerHTML
if(sn==0){
window.open("http://www.baidu.com")
}
setTimeout("daojishi()",1000);
sn--;
document.getElementById("one").innerText=sn;
}
function sea()
{
window.history.back();
}
{
var sn=document.getElementById("one").innerHTML
if(sn==0){
window.open("http://www.baidu.com")
}
setTimeout("daojishi()",1000);
sn--;
document.getElementById("one").innerText=sn;
}
function sea()
{
window.history.back();
}
已采纳回答 / 麻辣烫不加辣
不好意思,我搞错了。我刚刚测试了一下,去掉var就可以运行了。结果我重新再试了一下加上var,还是可以运行。那说明你可能代码中的标点符号写成中文的了。不如你把代码复制上来我试试?
2020-01-16
最赞回答 / 晓之蛇
substring() 方法用于提取字符串中介于两个指定下标之间的字符substr() 方法从字符串中提取从 startPos位置开始的指定数目的字符串例子:字符串“HelloWorld!”,截取World!<...code...>
2020-01-14
+ 我来回答
回答最高可+2积分
最新回答 / IEwuIL7
月份:因为数字是从0-11 所以+1就刚好是当前正确的月份数空数组 :你发现没,你不理解的空数组那一行代码前面有 // ,这个符号代表编译器不运行此行代码(即不会编译) *我不知道这是你自己添加的//还是本来就有的,如果是本来就有的,答案就是如上,因为此空数组确实没用到。
2020-01-12