JSFiddle - React, Tailwind, and code Playground

by Serhioromano

HTML

<input type="text" id="name">
<input type="text" id="login">

JavaScript

var translite = {
    "а":"a",
    "б":"b",
    "в":"v",
    "г":"g",
    "д":"d",
    "е":"e",
    "ж":"j",
    "з":"z",
    "и":"i",
    "к":"k"
}
$('#name').blur(function(){
    var value = this.value;
    $.each(translite, function(key, val){
        value = value.replace(key, val);
    });
    
    this.value = value;
})