No JavaScript:
function myFunction (){
var input = document.querySelector('.inputt');
var text = document.createTextNode('');
b_i.innerHTML = textt;
alert(textt);
}
HTML :
<input class='inputt'/>
<button onclick='myFunction'></button>