As you have described,i am having two text boxes along with a button as below
<input type="text" id="FirstTextBox" />
<input type="text" id="SecondTextBox" />
<input type="button" id="TransferButton" value="Click Me!" />
javascript for clear textbox values after transfering textbox values to other text box
$(document).ready(function(){
$("#TransferButton").click(function () {
var collectedValue = $("#FirstTextBox").val();
$("#FirstTextBox").val("");
$("#SecondTextBox").val(collectedValue);
});
});