<script src ="путь к файлу js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<input id="elem1" type="text" name="quantity" placeholder="количество">
<input id="butt" type="button" value="кнопка"><br>
<div id="str"></div>
<script>
let butt=document.getElementById('butt')
butt.onmousedown=()=>{
document.getElementById("str").innerHTML="Вы ввели"+document.getElementById('elem1').value;
}
</script>
</body>
</html>