//時刻データを取得して変数に格納する
//変数は"time"とする
var time= new Date();

//時・分・秒を取得
var hour = time.getHours();
var minute = time.getMinutes();
var second = time.getSeconds();

document.write(hour+"時",+minute+"分"+second+"秒");

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.