$(function () {
$('#cmd').bind('keydown', function (evt) {
if (evt.keyCode === 13) {
//* I want to call the function here *//
}
});
});
This is the function i want to call wit the parameter.
$(function (String msg) {
var cmdStr = msg;
$.ajax({
url: 'exec.php',
dataType: 'text',
data: {
q: cmdStr
},
success: function (response) {
$('#txtOut').append(response);
}
});
}
});
});