<script type="text/javascript">
var attime;
function clock(){
var time=new Date();
attime= (time.getHours()+":"+time.getMinutes()+":"+time.getSeconds());
document.getElementById("clock").value = attime;
}
var int=setInterval(clock,1000)
</script>
var attime;
function clock(){
var time=new Date();
attime= (time.getHours()+":"+time.getMinutes()+":"+time.getSeconds());
document.getElementById("clock").value = attime;
}
var int=setInterval(clock,1000)
</script>
2019-06-11
最新回答 / Leon4055
没有规则, 原生js 没有变量类型, 想赋值 数组 变量就是数组, 想赋值字符串 变量就是字符, var tmp = [1, 2, 4];console.log(tmp);tmp = 123;console.log(tmp);tmp = 'string';console.log(tmp);tmp = function () { };console.log(tmp);运行一下这段代码, 你就明白了
2019-06-11
最新回答 / 慕仰6034142
请教,输出成绩这里,document.write(parseInt(sum/num.length)); 如果是求班级平均分的话可以不用parseInt取整吧?
2019-06-11
已采纳回答 / AaronCR
function checkone(){ var j=document.getElementById("wb").value; // 获取输入的内容 var hobby = document.getElementsByName("hobby");// 获取爱好的数组,下标从0开始。 hobby[parseInt(j)-1].checked = true; // 获取输入的内容是字符串,需转成整数。 }
已采纳回答 / Gixgine
var miao=time.getSeconds();if(miao<10){miao="0"+time.getSeconds();}else{miao=time.getSeconds(0)}
2019-06-10
已采纳回答 / weixin_慕村931117
getElementById 写代码仔细点哦 你少打了个n 你的是 getElemeltById还有就是这个方法括号里用的是双引号,你的事单引号
2019-06-09
最赞回答 / 奋斗的面包
你的代码有问题,
&ML&!DOCTYPE HTML&t; &t;hhtml&t; & &head&ta &"Cometa http-equiv="Content-Type" content="text/html; charset=utf-8"&二维数 &>title&/he二维数组</title&typ &"te/head&asc & script type="te...
2019-06-08