SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    document.write(+"dqm_" +brn +".js"); -wrong output

    Is there something wrong maby with my explorer? I keep on getting bad outputs. I'm really new, like 2 days.

    test="output";
    document.write(test);
    document.write("<br>");
    document.write(+test);


    OUTPUT

    output
    NaN


    This doesen't seem right?

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Location
    UK
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    document.write(+test);

    you dont need to put the + there just have

    document.write(test);

    NaN means not a number, explorer thinks you are trying to add things.
    -AT

  3. #3
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The last output has a + in front of it? whys that...

    You could do it all on the same line just like

    test="output";
    document.write(test + "<br>" + test);

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh I see the syntax now. Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •