dfsfds
This commit is contained in:
parent
b58fdf3328
commit
672afac235
3 changed files with 3 additions and 2 deletions
|
@ -7,7 +7,7 @@ function post(url, callback, errortext) {
|
|||
xhr.onerror=function() { alert(errortext); };
|
||||
xhr.onload = function() {
|
||||
if (xhr.status >= 200 && xhr.status < 300) {
|
||||
callback();
|
||||
if (typeof callback === "function") callback();
|
||||
} else {
|
||||
xhr.onerror();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue