How to input only english text. English number. Bangla Number
Comment (0)
Admin
#How_to_input_only_bangla_number #How_to_input_only_english_number #How_to_input_only_english_text
Hello Dev?
Today i show you sum input typw with javascript
1. Only English Input Capital Letter (text)
<div class="form-group row mb-2">
<label for="inputEmail3" class="col-sm-6 control-label mt-2 text-end">Title <span class="text-danger" >*</span></label>
<div class="col-sm-6">
<input type="text" name="name" oninput="this.value=this.value.replace(/[^A-Z ]/g,'');">
</div>
</div>
2. Only English Input Small Letter (text)
<div class="form-group row mb-2">
<label for="inputEmail3" class="col-sm-6 control-label mt-2 text-end">Title <span class="text-danger" >*</span></label>
<div class="col-sm-6">
<input type="text" name="name" oninput="this.value=this.value.replace(/[^a-z ]/g,'');">
</div>
</div>
3. Only English Input (Number )
<div class="form-group row mb-2">
<label for="inputEmail3" class="col-sm-6 control-label mt-2 text-end">Number <span class="text-danger" >*</span></label>
<div class="col-sm-6">
<input type="text" name="name" oninput="this.value=this.value.replace(/[^0-9 ]/g,'');">
</div>
</div>
4. Only Bangla Input (Number )
<div class="form-group row mb-2">
<label for="inputEmail3" class="col-sm-6 control-label mt-2 text-end">Number<span class="text-danger" >*</span></label>
<div class="col-sm-6">
<input type="text" name="name" oninput="this.value=this.value.replace(/[^০-৯ ]/g,'');">
</div>
</div>
3. Bangla And English Input (Number )
<div class="form-group row mb-2">
<label for="inputEmail3" class="col-sm-6 control-label mt-2 text-end">Number<span class="text-danger" >*</span></label>
<div class="col-sm-6">
<input type="text" name="name" oninput="this.value=this.value.replace(/[^০-৯0-9 ]/g,'');">
</div>
</div>
Hope it help you........
Thanks.
Comments (0)
Your Comment