TCH-Thomas Posted October 2, 2003 Posted October 2, 2003 Hi everyone, I´ve been playing around with this script but dont get it right, what part do I delete to ONLY have the date showing and not "Todays date is". [<script LANGUAGE=javascript"><!-- // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL: http://www.cgiscript.net // Use the script, just leave this message intact. // Download your FREE CGI/Perl Scripts today! // ( http://www.cgiscript.net/scripts.htm ) // *********************************************** // Get today's current date. var now = new Date(); // Array list of days. var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); // Array list of months. var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December'); // Calculate the number of the current day in the week. var date = ((now.getDate() // Calculate four digit year. function fourdigits(number) { return (number } // Join it all together today = days[now.getDay()] + ", " + months[now.getMonth()] + " " + date + ", " + (fourdigits(now.getYear())) ; // Print out the data. document.write("Today\'s date is " +today+ "."); //-->] I took away this part (it wasnt correct): Today\'s date is -Thomas Quote
Wilexa Posted October 2, 2003 Posted October 2, 2003 I don't know anything about JavaScript, but did you try changing the line to: >document.write(today); ...dave Quote
vendlus Posted October 2, 2003 Posted October 2, 2003 document.write("<b>Today\'s date is</b><br> " +today+ "."); change the above to.... >document.write(today); That should do it. *edit* which if I was actually reading and not just replying, I would have noticed that Wilexa had said this. So... do what Wilexa said. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.