请帮忙。我在使用jquery keydown
将数据发布到数据库时遇到了一些困难-
$(document).ready(function() {
$('#notify').bind("keydown", function(e){
if ( e.which == 13 ) {
var notes = $('.note').val();
var targeturl = 'http://www.domain.com/notifications/index/33/'+notes;
//alert(targeturl);
$.ajax({
dataType: "html",
type: "POST",
evalScripts: true,
url: targeturl,
complete: function () {
// Handle the complete event
var result = "Thanks for update your fans";
$("#thanksfornotes").fadeOut("slow").html(result);
}
})
}
});
});