AMATORx,
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<input type="text" id="inp">
<script>
document.getElementById('inp').onkeypress = function(event){
if(event.keyCode == 32){
var v = this.value;
var a = this.selectionStart;
this.value = v.substr(0,a) + '×' + v.substr(a);
this.selectionStart=this.selectionEnd=++a;
};
if(event.keyCode < 48 || event.keyCode > 57 ){
return false;
}
}
</script>
</body>
</html>