$(function() { $(document.getElementById("makeRequest")).click(function () { $.ajax({ url: "/music", success: function(data){ document.body.innerHTML = data; }, /*<-- запятая?*/ })})