window.setTimeoutを使った現在時刻表示

By in 工事中エリア on 2013/07/14


結果


ソース

<div id=”test2″></div>
<script type=”text/javascript”>// <![CDATA[
document.getElementById("test2").appendChild(document.createTextNode("Hello World3"));
delay=1000;
code = function(){
document.getElementById("test2").innerHTML=(Date());
window.setTimeout(code, delay);
}
window.setTimeout(code, delay);
// ]]></script>

Comments are closed.