展开全部
<script>
function tick() {
var years,months;
var intYears,intMonths;
var today;
today = new Date();
intYears = today.getFullYear();
intMonths = today.getMonth() + 1;
years = intYears + "-";
if(intMonths < 10 ){
months = "0" + intMonths +"-";
} else {
months = intMonths +"-";
}
timeString = years+months;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 1000);
}
window.onload = tick;
</script>
追问
有html代码么?需要放在哪个标签上啊?
追答
....... 2631167143@qq.com 这个联系我把
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询