<script type="text/javascript">
var d = new Date()
var vYear = d.getFullYear()
var vMon = d.getMonth() + 1
var vDay = d.getDate()
document.write(vYear)
document.write("-")
document.write(vMon<10 ? "0" + vMon : vMon)
document.write("-")
document.write(vDay<10 ? "0"+ vDay : vDay )
</script>