已采纳回答 / 忆木偶
检验当前浏览器是否是chrome浏览器indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置,找不到则返回-1。>-1表示找到这个浏览器建议回去看看indexOf()详细内容
2015-07-29
var browser=navigator.appName;里面的navigator 这个是什么意思?貌似不是一个变量吧 因为也没定义...
2015-07-29
<script type="text/javascript">
var num=0;
function startCount() {
document.getElementById('count').value=num;
num=num+1;
setTimeout("startCount()",1000)
}
setTimeout(startCount(),1);
</script>
14行的内容按照题目要求应该是setTimeout而不是window.onload=startCount
var num=0;
function startCount() {
document.getElementById('count').value=num;
num=num+1;
setTimeout("startCount()",1000)
}
setTimeout(startCount(),1);
</script>
14行的内容按照题目要求应该是setTimeout而不是window.onload=startCount
2015-07-29
function clock(){
var time=new Date();
document.getElementById("clock").value = time;
}
var t1=setInterval(clock,1000);
var time=new Date();
document.getElementById("clock").value = time;
}
var t1=setInterval(clock,1000);
2015-07-29
var attime;
function clock(){
var time=new Date();
attime=time.getHours()+":"+time.getMinutes()+":"+time.getSeconds();
document.getElementById("clock").value = attime;
}
setInterval(clock,1000);
function clock(){
var time=new Date();
attime=time.getHours()+":"+time.getMinutes()+":"+time.getSeconds();
document.getElementById("clock").value = attime;
}
setInterval(clock,1000);
2015-07-29
function mysty()
{
alert("欢迎来到慕课网!");
window.open("http:/www.imooc.com/",'_blank','width=600px,height=400px');
}
下方再给按钮加一个onclic标签就可以啦
{
alert("欢迎来到慕课网!");
window.open("http:/www.imooc.com/",'_blank','width=600px,height=400px');
}
下方再给按钮加一个onclic标签就可以啦
2015-07-29
最赞回答 / 果子李
var myarr=["星期天","星期一","星期二","星期三","星期四","星期五","星期六"];中间用的是中文逗号,for(var i=1;i<realScore.length;i+=2;) 后边多了一个分号程序是正确的嘻嘻开心
2015-07-29
并不是把标签间的空格删掉才可以出现结果,而是节点的类型就是3(文本),它的节点值是空,如果你在<div id="con">后加一句话,例如:hello,节点的值就是hello。同理,最后一个子节点也一样。
2015-07-29
document.write("元素(div)的第一个子节点的"+"<br/>");
document.write("节点名称:"+x.firstChild.nodeName+"<br/>"+"节点类型:"+x.firstChild.nodeType+"<br/>"+"节点值:"+x.firstChild.nodeValue+"<br/><br/>");
document.write("节点名称:"+x.firstChild.nodeName+"<br/>"+"节点类型:"+x.firstChild.nodeType+"<br/>"+"节点值:"+x.firstChild.nodeValue+"<br/><br/>");
2015-07-29