<input id="elem1" type="text" name="quantity" placeholder="Количество">
<input id="butt" type="button" value="Кнопка"/><br><br>
<div id="str"></div>
butt.onclick = function() {
var val = document.getElementById('elem1').value;
document.getElementById('str').innerHTML="Вы ввели: "+val;
};