37 users online (1 members and 36 guests)  


  Results 1 to 3 of 3

Related

  1. Replies: 0
  2. Passing Javascript variables to a form    Forum: Javascript Forum
    Replies: 0
  3. build a URL with variables in it    Forum: PHP Forum
    Replies: 2
  4. Replies: 3
  5. Status variables not updating?    Forum: PHP Forum
    Replies: 1
  1. #1
    wconti's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2003
    Posts
    2

    Javascript Variables

    Hello!

    I have this var
    myVar=new Date(2003,2,12,17,18,12);

    alert(myVar) returns "Wed Mar 12 17:18:12 PST 2003"

    Is it possible to get just the literal string
    "new Date(2003,2,12,17,18,12);"
    instead of the formed date?

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya,

    try -

    Code:
    myVar='new Date(2003,2,12,17,18,12)';
    
    alert(myVar);
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    Doorknob's Avatar
    Super Newbie

    Status
    Offline
    Join Date
    Jun 2002
    Location
    Malaysia
    Posts
    316



Tags for this Thread