Javascript / jQuery-在某些位置输入一些预填充字符,在其他空位置填充

是否可以输入文字类型,在位置3和6上预设一个预定义字符,例如“ $”,然后允许填充位置1,2,4,5,7,8,9还有10个其他字符?

So for example, when the user opens the page and first sees this input, the stuff displayed in the input would be:
_ _ $ _ _ $ _ _ _ _
and he can only fill those positions marked with "_".

提前致谢!

评论