Flash Vista - Principal
Sitio de Destello de la Semana
The Two Tales
InformaciСn del site | Archivo
NavegaciСn Principal
Principal
Enlaces Nuevos
Lo más Popular
Lo Más Popular
Recomendaciones del Editor
Buscar

Flash Tutorials
Flash Resources
Noticias
Flash Templates
Flash Intro Templates
Website Templates
Flash Games
Flash Books
Encuestas
Mapa


EslabСn Arbitrario
English
Hybrid Works
InformaciСn del site | Consiga otro
FlashVista
Conectar
Registrar
Subscribir

Añadir enlace
Modificar Enlace
Favoritos
Sugerir Categoría

Hacer publicidad
ApСyenos
CrИditos & Agradece
Contacto

Flash Templates:

More Templates ...

Lista de correo
Usuario

Clave



Registrar
©Ha olvidado usted su contraseЯa?
Partner websites
Free Hit Counter
Free Seo Tools
Free Tutorials
Free Video Tutorials
Forum signatures
Best Free Scripts
Wii Fit
Wii Fit News
Cool Tech Gadgets
Other Resources
Sugerir
Sugerir a un amigo


Lista de correo
Estado: No estás conectado/identificado

Español English German French Spanish Italian Portuguese Russian Polish Finnish Dutch Swedish Thai Romanian Traditional Chinese Simplified Chinese
BuscarNo estás conectado/identificado
Clave: Buscar: Búsqueda Avanzada


Uppercase First Letter


NEW Flash Tutorials in Video Format - Powered by LearnFlash.com: 45 minutes of flash tutorials now available in streaming format or download. Topics Include flash for beginners, text effects, actionscripting, audio/video, flash 8 and more.


Printer version



by Guy Watson
www.flashguru.co.uk

Personally i feel that making the first letter of a word, in a sentence and sometimes the first letter of every word in a sentence, looks better than all lowercase. When it comes to input textfields and the loading of external content, i like to make the first letter capitalised, so i created a String method, which i use regularly and i thought i would share it...

Heres the code for the method:


String.prototype.ucFirst=function()
{
if(arguments[0] == true)
{
var words=this.split(" ")
for(var w in words)
{
words[w]=words[w].ucFirst()
}
return words.join(" ")
}
return this.charAt(0).toUpperCase()+this.substring(1,this.length)
}


And heres how you would use it:


input_title="this is my title";
title=input_title.ucFirst();
input_name="guy watson";
name=input_name.ucFirst(true);



(Añadida: 02-02-2004, Visitas: 0, Evaluación: 2.88, Votos: 17, Comentarios: 1)
AЯada a Favoritos Sugiera a un Amigo

Comentarios: (1)

i love you
(Añadida: 01-10-2005 Usuario: Invitado)


Añadir Comentario
Please note:
We review EVERY comment before it appears on the site, so please dont waste your time by posting spam links :)
No URLs allowed, no HTML please.

If you register or login first, your review will contain your nickname


Evaluarlo



¡Genial!
Muy bueno
Bueno
Aprobado
Malo