A primera vista el código no deberia darte errores, si el usuario sabe exactamente que se deben ingresar numeros, pero si ingresa un valor NO numerico es normal que el resultado de NaN, por lo cual se debe realizar dicha validación:
Código HTML:
<html>
<head>
<script>
function actualiza_total()
{
var cant = document.getElementById('cantidad').value;
var precio = document.getElementById('precio').value;
if(isNaN(cant) || isNaN(precio)) {
alert("Solo valores numericos por favor");
document.getElementById('cantidad').value = "";
document.getElementById('precio').value = "";
return;
}
document.getElementById('total').value = cant*precio;
}
</script>
</head>
<body>
<input type="text" id="cantidad">
<input type="text" id="precio">
<input type="button" value="multiplicar" onClick="actualiza_total()">
<input type="text" id="total">
</body>
</html>