<script type="text/javascript"> function RepINP(a){ var Ch = ".dll", My = ".so"; a.value = a.value.replace(eval("/"+Ch+"/g"), My) } </script> <form> <input id=InpFrm1 type=text name="plugin" onchange="RepINP(this)" autocomplete="off"/> </form>