<html>
<body>
<h1>Window 对象</h1>
<h2>setTimeout() 方法</h2>
<p>输入字段会告诉已逝去两秒、四秒和六秒的时间。</p>
<input type="text" id="txt">
<script>
let x = document.getElementById("txt");
setTimeout(function(){ x.value="2 seconds" }, 2000);
setTimeout(function(){ x.value="4 seconds" }, 4000);
setTimeout(function(){ x.value="6 seconds" }, 6000);
</script>
</body>
</html>