Edit in JSFiddle

<input type="text" name="textBox"  id="textBox" value="My Text">
<input type="button" value="Press Me" id="pressMe">
$("#pressMe").click(function () {
alert($("#textBox").val())
});