-4

请帮我找出其中的错误:

var username = document.getElementById("username_input").value;
var password = document.getElementById("password_input").value;
var password_confirm = document.getElementById("password_confirm").value;
xhr.open('POST', 'header/onsubmit_check.php');
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send("username=" + username + "&password"= + password +"&password_confirm=" + password_confirm);
4

1 回答 1

4

我不确定您的其余代码是什么样的,但也许您忘记了...

var xhr = new XMLHttpRequest();

编辑:没关系,找到它:

改变这个:

"&password"=

对此:

"&password="
于 2013-07-28T06:52:59.143 回答