1
$(function() {
$('#cmd').bind('keydown', function (evt) {
if (evt.keyCode === 13) {
//* I want to call the function here *//
}
});
});
이것은 매개 변수를 호출하기 원하는 함수입니다.jQuery의 함수에서 외부 함수 호출하기
$(function (String msg) {
var cmdStr = msg;
$.ajax({
url: 'exec.php',
dataType: 'text',
data: {
q: cmdStr
},
success: function (response) {
$('#txtOut').append(response);
}
});
}
});
});