Jump to content

smahmud

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by smahmud

  1. Thanks Jesh.That did not work. Following is even a smaller example with the same problem. Please help:======================================================<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled</title><script type="text/javascript">function showdate(){var d=new Date();var t= d.getmonth();document.write(d.getMonth());}</script></head><body><script type="text/javascript">showdate();</script></body></html>
  2. Hi friends,I am new to HTML/Jscript. I am getting an error from this line of the following code snippet. The error says that getmonth() is not a valid method for today of type date().this_month = today.getmonth()Please help figuring out the mystry.Thanks.Sean.========================================HTML><HEAD><script language="javascript">function get_quarter(){var today = new Date()this_month = today.getmonth()this_year = today.getyear()switch(this_month){case 0,1,2:return this_year+'1'case 3,4,5:return this_year+'2'case 6,7,8:return this_year+'3'case 9,10,11:return this_year+'4'}function say_it(){document.write("The current quarter is " + get_quarter());}</script></HEAD><BODY><script language="JavaScript">say_it();</script></BODY></HTML>
×
×
  • Create New...