I'd like to use JavaScript's indexOf to detect and execute specific characters (such as values ​​I have decided) on the form.


"Aiueo, Kakikukeko, Sashisuseso, Tatsute"

When "aiueo, index, sashisoseso, tatsutoto" is selected, the index part is detected by indexOF
I want to create something that executes the process and puts it in the input field.

Isn't it possible to do something like "Aiueo, input field, Sashisuseso, Tatsuto"?

Please give me advice.

  • Answer # 1


    "Aiueo, Kakikukeko, Sashisuseso, Tatsute"
      When "Aiueo, index, Sashisuseso, Tatsuteto"

    I don't know what the plow has done
    Without doing anything, Kakikuke will not be an index
    index will not be an input field.

    Regular expressions may be easier to change strings

     Aiueo, Kekikuko, Sashisuseso, Tatsuteto