<!-- 오늘날짜 -->
<script type="text/javascript">
var result = document.getElementById("today-result");
result.innerHTML = getTimeStamp();
function getTimeStamp() {
var d = new Date();
var s =
leadingZeros(d.getFullYear(), 4) + '/' +
leadingZeros(d.getMonth() + 1, 2) + '/' +
leadingZeros(d.getDate(), 2);
return s;
}
function leadingZeros(n, digits) {
var zero = '';
n = n.toString();
if (n.length < digits) {
for (i = 0; i < digits - n.length; i++)
zero += '0';
}
return zero + n;
}
</script>
<div id="today-result" style="text-align: center; font-size: 1.5em; color: red;"></div>