我的代码是server1而 PHP 代码是server2。两台服务器是分开的。这段代码有什么问题?
var hr = new XMLHttpRequest();
hr.open("POST", "http://www.3675design.com/Clients/hl/developers/cyber/itgetbetter/email/index.php", true);
hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
hr.onreadystatechange = function () {
if (hr.readyState == 4 && hr.status == 200) {
var data = JSON.parse(hr.responseText);
for (var obj in data) {
document.getElementById("conformation_and_error_header").innerHTML = "Video";
document.getElementById("conformation_and_error_body").innerHTML = "Share yor video";
$(document).ready(function () {
$(".inline_popup_display_2").colorbox({
inline: true,
width: "50%"
});
});
}
}
}
hr.send("name=" + name + "&mail=" + mail + "&youtube=" + youtube + "&comments=" + comments + "");