JSFiddle - React, Tailwind, and code Playground

by alaa13212

HTML

<script>
function testSpace(event) {
    var output = document.getElementById('output');
        inputVal = event.target.value,
        length   = inputVal.length;
    
    output.value = length;
}
</script>
<input type="text" oninput="testSpace(event)"/><br />
عدد الحروف الموجودة في الحقل: <b><output id="output"></output></b>

CSS

html{
    direction:rtl;
}