<script>
var d=new Date();
var str3 = d.getFullYear() + "-" + (d.getMonth()+1) + "-" + d.getDate();
alert(str3);
</script>