<input type="text" onkeypress="this.value=this.value.replace(/\,/,'.')" onchange="this.value=this.value.replace(/\,/,'.')"/>