I want to send my text by value by pressing enter instead of pressing buttun like the following,but how can i do it?
$("#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,}),