我想通过按Enter键而不是像下面那样按下按钮来按值传送我的文字,但是我该怎么办呢?
$("#senddata").click(function () {
var drp = document.getElementById('autocomplete').value;
$.ajax({
dataType: "json",
type: "POST",
url: "@Url.Action("ID","AdminTool")",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ "turbine": drp,}),