var now = new Date(); var yr = now.getFullYear(); document.write(yr);