Ajax在xampp中不起作用

I am trying to alert the message from other file using php, ajax in localhost xampp but could not get the result.Can someone please help? My ajax

$('#diary').bind('input propertychange', function() {
    $.ajax({
    method: "POST",
    url: "updatedatabase.php",
    data: { content: $("#diary").val() }
    })
        .done(function( msg ) {
        alert( "Data Saved: " + msg );
    });
});