Prima data, adaugi un event listener pe input (keyup, keydown, ..), apoi aplici un callback care iti formateaza output ul. Pentru functia care iti formateaza output ul poti folosi si expresii regulate (nivel avansat ), apoi faci append in DOM.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Find and Replace Dashes</title>
</head>
<body>
<form action="" class="">
<input type="text" class="target">
</form>
<script type="text/javascript">
let input = document.getElementsByClassName('target')[0];
let newNode = document.createElement('p');
String.prototype.replaceAllDashes = function(search, replacement) {
let target = this;
return target.split(search).join(replacement);
};
input.addEventListener('keyup', function() {
newNode.innerHTML = this.value.replaceAllDashes('-', '/');
document.body.appendChild(newNode);
});
</script>
</body>
</html>