[removed] How to change color to only part of the string in an input field?

后端 未结 4 691
一个人的身影
一个人的身影 2020-12-22 03:55

I have an input field where I would like to have the characters turn red after the 10th symbol.

So far I have:

var street_1 = document.getElementById         


        
4条回答
  •  心在旅途
    2020-12-22 04:05

    You can do a substring and append a element like span and then target the span with css or js directly.

提交回复
热议问题