0

我正在尝试将数据存储在 solr 服务器中,但页面显示错误

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="Include/JS/JqueryPlugin/jquery-1.8.2.min.js"></script>
<script>
    function save() {
        try {
            $.ajax({
                type: "POST",
                url: "http://192.168.10.113:8080/solr/update/json?commit=true",
                data: { "add": { "doc": { "id": "222222", "name": "Ruby on Trails" } } },
                contentType: "application/json; charset=utf-8",
                dataType: 'jsonp',
                crossDomain: true,
                jsonp: 'json.wrf'
            });
        }
        catch (err) {
            alert(err);
        }
    }
</script>
</head>
<body>
<input type="button" id="button" onclick="save()" value="Submit" />
</body>
</html>

如何摆脱这个问题。我在google上搜索,发现html页面或js页面中的语法错误。

但就我而言,我没有检查任何错误。

请帮助解决此错误。

提前致谢

4

0 回答 0