Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/07/2008, 10:52
Avatar de pato12
pato12
 
Fecha de Ingreso: septiembre-2007
Ubicación: Salta
Mensajes: 1.620
Antigüedad: 16 años, 6 meses
Puntos: 101
Respuesta: Aplicar estilos al mensaje

Hola,
Preuba esta function:
Código HTML:
<script>
flag=0; // Cambiar a 1 su queres que se escriba en mayuscula o catiba la funcion capIt();
function addTex(let){
var story = document.miformulario.micampo; // El campo a escribir
if(let=="BACK"){
story=story.value.substring(0, story.length-1);
story.value=story.value;
story.focus();
}
else if(flag==1){
story.value+=let.toUpperCase();
flag=0;
story.value=story.value;
story.focus();
}
else{
story.value+=let;
flag=0;
story.value=story.value;
story.focus();
}
}
function capIt(){
flag=1;
}
</script> 
y estas:
Código HTML:
<script>function escribir_web(){
title = prompt('Titulo:',"");
if(title!=null){
web = prompt('Direcion web:',"http://");
if(web=="http://" || web==null){
alert('No as escrito una direccion valida.');
}else{
addTex('[url='+web+']'+title+'[/url]');
}
}
}
function b(){
texto = prompt('Texto en negritas:',"");
if(texto==null || texto==""){
}
else{
addTex('[b]'+texto+'[/b]');
}
}
function i(){
texto = prompt('Texto:',"");
if(texto==null || texto==""){
}
else{
addTex('[i]'+texto+'[/i]');
}
}
function u(){
texto = prompt('Texto subrayado:',"");
if(texto==null || texto==""){
}
else{
addTex('[u]'+texto+'[/u]');
}
}
function imagen(){
image = prompt('Direcion de la imagen:',"http://");
if(image==null || image==""){
}
else{
addTex('[img]'+image+'[/img]');
}
}
function colo(){
texto = prompt('Texto:',"");
if(texto==null || texto==""){
}
else{
color = prompt('Color:  (Ej.: red,blue o puede ser html)',"");
if(color==null || color==""){
}else{
addTex('[color='+color+']'+texto+'[/color]');
}
}
}</script> 
Suerte
Salu2
__________________
Half Music - www.halfmusic.com