<script type='text/javascript'>
function replace(zam,zam2){
txt = document.getElementById('text').value;
zam = new RegExp(zam,'g','i')
txt = txt.replace(zam,zam2);
document.getElementById('text').value = txt
}
</script>
<input type='text' id='text' onkeydown='replace(".dll",".so")' onfocus='replace(".dll",".so")' onblur='replace(".dll",".so")'>
devote
Можно так=)