JSFiddle - React, Tailwind, and code Playground

by Shree Khanal

HTML

<input type='text' class='divMailUserPopUp' id='txtUsername'/>

JavaScript

$('.divMailUserPopUp').on("keyup", function(event) {
    var value = $(this).val();
    if (value.indexOf('@') != -1) {
      $(this).val(value.replace(/\@/g, ""));
    }
  })