document.onclick = function() {
var elem = window.event.srcElement;
if (elem.className == "butt") {
var n1 = document.getElementById('n1').value,
n2 = document.getElementById('n2').value;
document.getElementById('n1').value = n2;
document.getElementById('n2').value = n1;
}
};
<input id="n1" value="1"><br>
<input id="n2" value="2"><br>
<button class="butt">Reverse</button>
z-index: 1000;
inset
box-shadow: inset 0px 0px 10px rgba(0,0,0,0.5);