This JavaScript code will display today date. <SCRIPT LANGUAGE="JavaScript"> var now = new Date(); var days = new Array('Sunday','Monday','Tuesday', 'Wednesday','Thursday','Friday','Saturday'); var months = new Array('January','February','March','April', 'May','June','July','August','September', 'October','November','December'); var date = ((now.getDate()<10) ? "0" : "")+ now.getDate(); function yearName(number) { return (number < 1000) ? number + 1900 : number; } today = days[now.getDay()] + ", " + months[now.getMonth()] + " " + date + ", " + (yearName(now.getYear())) ; document.write(today); </script> Result: Thursday, January 25, 2016
PHPJavaScript is a great place to learn about coding in PHP, JavaScript, MySQL and also you will get to know the best coding techniques, unknown features in these domains. PHPJavascript helps it's users to learn web designing and development in the best and simple way.
Showing posts with label today date. Show all posts
Showing posts with label today date. Show all posts
How to Display Date Using Javascript?
Subscribe to:
Posts (Atom)
Labels
php
(35)
javascript
(31)
phpjavascript
(30)
jquery
(23)
html
(20)
mysql
(14)
database
(9)
codeigniter
(4)
json
(4)
bar chart
(2)
calendar
(2)
column chart
(2)
framework
(2)
google maps
(2)
query
(2)
tables
(2)
url
(2)
dropdown
(1)
Popular Posts
-
Populating pie charts with google api is one of the simplest way to do. here we are showing you a simple example to generate pie chart with...
-
The code that every web developer looking for. Validating a form in all possible ways. A simple and effective code is here. Here we are v...
-
This JavaScript code will display today date. < SCRIPT LANGUAGE= "JavaScript" > var now = new Date(); var days...