我正在尝试使用Apache Fuseki端点创建一个不错的用户界面。这是我的javascript:
$(document).ready(function(){
var query =
["prefix ab: <http://learningsparql.com/ns/addressbook#>",
"SELECT ?craigEmail",
"WHERE",
"{ab:craig ab:email ?craigEmail.}"].join(" ");
const url= "http://localhost:3030/ds/" + "?query" + encodeURIComponent(query) + "&format=json";;
$("button").click(function(){
window.alert(url);
$.ajax({url: url, success: function(result){
window.alert(url);
$("#div1").html(result);
}});
});
});
您知道为什么查询无法按原样工作吗?