Im Stuck In This

windows

Guest
Hi everyone,<br />I纾沞 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".<br /><br />[<script LANGUAGE="javascript"><!--<br /><br />// ***********************************************<br />// AUTHOR: <!-- w --><a class="postlink" href="http://WWW.CGISCRIPT.NET">WWW.CGISCRIPT.NET</a><!-- w -->, LLC<br />// URL: <a href="http://www.cgiscript.net" target="_blank">http://www.cgiscript.net</a><br />// Use the script, just leave this message intact.<br />// Download your FREE CGI/Perl Scripts today!<br />// ( <a href="http://www.cgiscript.net/scripts.htm" target="_blank">http://www.cgiscript.net/scripts.htm</a> )<br />// ***********************************************<br /><br />// Get today's current date.<br />var now = new Date();<br /><br />// Array list of days.<br />var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');<br /><br />// Array list of months.<br />var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');<br /><br />// Calculate the number of the current day in the week.<br />var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();<br /><br />// Calculate four digit year.<br />function fourdigits(number){<br />return (number < 1000) ? number + 1900 : number;<br />}<br /><br />// Join it all together<br />today = days[now.getDay()] + ", " +<br /> months[now.getMonth()] + " " +<br /> date + ", " +<br /> (fourdigits(now.getYear())) ;<br /><br />// Print out the data.<br />document.write("<b>Today\'s date is</b><br> " +today+ ".");<br /> <br />//--></SCRIPT>]<br /><br />I took away this part (it wasnt correct):<br /><b>Today\'s date is</b><br><br /><br />-Thomas <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /><!--content-->
I don't know anything about JavaScript, but did you try changing the line to:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->document.write(today);<!--c2--></div><!--ec2--><br /><br />...dave<!--content-->
<!--QuoteBegin-Tonsa+Oct 2 2003, 12:16 PM--><div class='quotetop'>QUOTE(Tonsa @ Oct 2 2003, 12:16 PM)</div><div class='quotemain'><!--QuoteEBegin-->document.write("<b>Today\'s date is</b><br> " +today+ ".");<!--QuoteEnd--></div><!--QuoteEEnd--><br />change the above to....<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->document.write(today);<!--c2--></div><!--ec2--><br />That should do it.<br /><br />*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. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /><!--content-->
 
Back
Top