Special character validation using JavaScript

前端 未结 5 1621
不思量自难忘°
不思量自难忘° 2021-01-15 02:48

Special characters <, >, %, \'\', \"\", $ and ^ are not allowed in a textbo

5条回答
  •  灰色年华
    2021-01-15 03:20

    Try something like

    In function you can get text from your textarea or what you are using. If data is valid function () should return true. Otherwise form wouldn't be submitted.

提交回复
热议问题