line break pb

Discussion in 'Javascript' started by steeve_dun@SoftHome.net, Oct 19, 2005.

  1. Guest

    Hi,

    I have this kind of code:
    Items[0]=['<a
    href="#x1">1st</a>']
    Items[1]=['<a
    href="#x2">2nd</a>']
    ....
    I need to transform it or treat it to have just:
    Items[0]=['<a href="#x1">1st</a>']
    Items[1]=['<a href="#x2">2nd</a>']
    without the line breaks.

    Can anybody help me please.
    Thanks

    -steeve
     
    , Oct 19, 2005
    #1
    1. Advertising

  2. Hm.. see "replace" method of string type.

    Exmaple Items[0] = Items[0].replace("\n", ""); or
    Items[0] = Items[0].replace("\n\r", "");

    пиÑал(а):

    > Hi,
    >
    > I have this kind of code:
    > Items[0]=['<a
    > href="#x1">1st</a>']
    > Items[1]=['<a
    > href="#x2">2nd</a>']
    > ...
    > I need to transform it or treat it to have just:
    > Items[0]=['<a href="#x1">1st</a>']
    > Items[1]=['<a href="#x2">2nd</a>']
    > without the line breaks.
    >
    > Can anybody help me please.
    > Thanks
    >
    > -steeve
     
    Gomolyako Eduard, Oct 19, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hugo
    Replies:
    10
    Views:
    1,318
    Matt Humphrey
    Oct 18, 2004
  2. kaushikshome
    Replies:
    4
    Views:
    773
    kaushikshome
    Sep 10, 2006
  3. Replies:
    12
    Views:
    968
  4. scad
    Replies:
    23
    Views:
    1,172
    Alf P. Steinbach
    May 17, 2009
  5. Marek Stepanek
    Replies:
    12
    Views:
    416
    Peter J. Holzer
    Sep 2, 2006
Loading...

Share This Page