0

I have a form with a input. When the user submits the form, i want the input value to change to be their input, but with some of it marked up. the want to differentiate part of an input value. The charAt values of what i want to be differentiated is stored in an array. This code doesn't work, becuase characters don' t have style properties. I have to work around that.

for(i=0;i<array.length;i++){
            input.value.charAt(array[i]).style.color="red";
            input.value.charAt(array[i]).italics();
            input.value.charAt(array[i]).style.fontWeight="bold";
            input.value.charAt(array[i]).style.textDecoration="underline";
        }
azerty
  • 33
  • 6

0 Answers0