$(document).ready(function() {
$("input[type='button']").click(function() {
var inputValue = $("#testInput").val();
alert(inputValue);
})
})
<input type="text" name="test" id="testInput" value="" />
<input type="button" value="请输入的值为" />