前端学习(2856):简单秒杀系统学习之定时器循环显示

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>javascrip</title>
	</head>
	<body >
		<script>
			function show() {
				console.log('每过1秒展示');
			}

function show2(str) {
	console.log(str);
}

function showTime()
{
	time = new Date();
	hour = time.getHours();
	minu = time.getMinutes();
	sec = time.getSeconds();

	datetime =  hour + ":" + minu + ":" + sec

	document.getElementById('checkvalue').value = datetime
}
var she;

she = setInterval(showTime, 1000);

clearInterval(she);
//setInterval(show2, 2000, '每过2秒展示');




		</script>
		<input type="button" id="checkvalue" />
	</form>
</body>
</html>

上一篇:渗透利器-kali工具 (第四章-1) Python环境安装与基本语法


下一篇:【算法学习记录-散列】【PAT A1048】Find Coins