你有这样尝试过吗?
function pollActiveParticipants() { var gamelink = '${gamelink}'; //Make sure it is having the value here. //alert(gamelink); or console.log(gamelink); $.ajax({ type: "GET", url: "pollActiveParticipants", data: {"gamelink": gamelink },dataType: 'json', success: function(data){ $.each(data, function(index, value) { '<p>' + value.username + '</p><br>'; }); } }); }要么
var gamelink = '${gamelink}'; //previously '<%=gamelink %>', not recommended url: "pollActiveParticipants?gamelink="+gamelink,dataType: 'json', ...希望这可以帮助。



