How to display current date using javascript in a textbox?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Darrel
Forum Commoner
Posts: 33
Joined: Fri Oct 10, 2014 2:30 am

How to display current date using javascript in a textbox?

Post by Darrel »

How to display current date using javascript in a textbox(xhtml)?

I have to create a text box in xhtml which displays the current date. The current date is produced by using javascript.
How do i do that? Do i create a function and call it? or do I do something else.
Thank You.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: How to display current date using javascript in a textbo

Post by Celauran »

Use the Date Object
Post Reply