Displaying Current date(mm/dd/yyyy) using Javascript
By displaying current date in our sites, we can give a more professional appearance to our sites. The following JavaScript code will display the date on our web in the following format:
<SCRIPT language=”JavaScript”>
var currentdate_date= new Date()
var month=currentdate_date.getMonth()+1
var currentdate=currentdate_date.getDate()
var year=currentdate_date.getYear()
//document.write(”currentdate’s date is: “)
document.write(month+”/”+currentdate+”/”+year)
</SCRIPT>
