这是我的服务电话
<jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616" validateConnections="true" doc:name="Active MQ">
<reconnect-forever blocking="false" frequency="5000"/>
</jms:activemq-connector>
这是我的后端代码
<script>
function secureClicked() {
var uname = document.getElementById('uname').value;
var pwd = document.getElementById('pwd').value;
var obj = new Object();
obj.username = uname;
obj.password = pwd;
var userObj = JSON.stringify(obj);
xhr = new XMLHttpRequest();
var url = "http://127.0.0.1:9923/login";
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
console.log(xhr.responseText);
var json = JSON.parse(xhr.responseText);
document.write(json.accesstoken);
onComplete(xmlhttp.responseText);
}
};
xhr.send(userObj);
}
我能够在邮递员中获得回复,但无法在浏览器中获得回复。 我在做什么呢? 谁可以帮我这个事? 在此先感谢!!