JSFiddle - React, Tailwind, and code Playground
by srikanth1818
HTML
<div class="textTest">
<input type="text"/>
</div>
JavaScript
$(".textTest input").keyup(function () {
if ($(this).val().match(/^[\u4E00-\u9FFF\u3400-\u4DFF\uF900-\uFAFF]+$/g)) {
alert('Chinese character sets');
}
else alert('English');
});