Sponsors

Web Designer? Design and market your own professional website with easy-to-use tools.

Compare, review and buy thousands of Laptops , software products at CheckCost.co.uk

Your Text Link Here! and your text description here!

Javascript getDate() Method

The javascript getDate() method returns the day of the month.

The value that is returned by the getDate() method is a number between 1 and 31. The getDate() method is always used in conjunction with a Date object.

The syntax for the using the getDate() method is:

dateObject.getDate()

The javascript below outputs the current day of the month.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>WebDevelopmentTutorials.com</title>
</head>
<body>

<script type="text/javascript" language="javascript">

var day = new Date();
document.write(day.getDate());

</script>

</body>
</html>

The javascript above outputs:

Free Website Hosting

WebDevelopmentTutorials.com