//時刻データを取得して変数に格納する
//変数は"time"とする
var time= new Date();
//時・分・秒を取得
var hour = time.getHours();
var minute = time.getMinutes();
var second = time.getSeconds();
document.write(hour+"時",+minute+"分"+second+"秒");
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.