Jump to content


Photo

Java Script


  • Faça o login para participar
4 replies to this topic

#1 nothing

nothing

    Novato no fórum

  • Usuários
  • 3 posts
  • Sexo:Não informado

Posted 26/01/2004, 15:10

Existe algum Java Script que limite o número de caracteres de um texto, tipo:

  Robin was laying on the bed, on his back, one arm out to the side and one arm draped across his eyes.  Today was his thirty-first birthday and it had gone like shit all day long.  He couldn’t believe that Axl Rose could fuck up one day so badly.  First he was late getting to the show, and by the time he arrived, the venue manager had already cancelled the show.  But then he had the nerve to put his band on lock down.  According to Axl, they had to stay in their hotel rooms and talk to no one until Axl had a chance to speak to the press about the show being cancelled.  And knowing Axl-fucking-Rose, that could be days.



            So Robin was ending his birthday in a hotel room in Vancouver, alone.  Thanks a lot, Axl.  Robin lifted the arm that was across his eyes and glanced at the clock.  It was almost one in the morning.  Damn it!  Why can’t I just fall asleep and forget this whole day?



            There was a knock at the hotel room door.  For a brief moment, Robin considered not answering it.  But with the tight security lockdown, the only person who co...  [click here to read all history]

Mais ou menos assim, pra ocultar parte de um texto muito grande. brigadu
GNR=NIN=Faculdade=Ocupado=Esquecimento=Memória=Já era=Não foi.
CONCLUSÃO: Alisa tem um blog

alisa.weblogger.com.br
Memórias translúcidas e semi-esquecidas...

#2 rockbilly

rockbilly

    Normal

  • Usuários
  • 94 posts
  • Sexo:Não informado
  • Localidade:BA

Posted 27/01/2004, 13:47

em javascript eu nunca tentei fazer, mas em ASP ou PHP eu tenho, se sim da um toque!
"Buscai o Reino de Deus e o resto virá por acréscimo de misericórdia!!" By Mateus
"Quanto mais sei, mais sei que nada sei" By Sócrates
"O pior câncer é o EGOÍSMO!!" By Anônimo
"A Tecnologia é boa, mas deixa as pessoas EGOÍSTAS!!" By Anônimo

#3 Without a Nick

Without a Nick

    Sem culpa no cartório

  • Usuários
  • 2378 posts
  • Sexo:Não informado
  • Localidade:Guarulhos

Posted 27/01/2004, 14:51

Você quer limitar o número de caracteres de um texto?

Tente isso:

<script language="javascript">
<!--
var str="O rato roeu a roupa do rei de Roma.";
var parte=str.substring(0,10);
document.write(parte);
//-->
</script>


Ele vai começar no caractere 0 (O) e vai terminar no caractere 10 ( e ).

Adapte ao seu texto.

#4 nothing

nothing

    Novato no fórum

  • Usuários
  • 3 posts
  • Sexo:Não informado

Posted 31/01/2004, 19:57

Nossa, muito obrigada! Valeu mesmo!!!! :*
GNR=NIN=Faculdade=Ocupado=Esquecimento=Memória=Já era=Não foi.
CONCLUSÃO: Alisa tem um blog

alisa.weblogger.com.br
Memórias translúcidas e semi-esquecidas...

#5 Without a Nick

Without a Nick

    Sem culpa no cartório

  • Usuários
  • 2378 posts
  • Sexo:Não informado
  • Localidade:Guarulhos

Posted 31/01/2004, 20:44

Sempre quando precisar, dá um grito, mas não vá no grito! :P :lol:




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq