fetch的地址是乱写的 但是浏览器 为什么依然可以跳转 目标html 而且不报错
如果删window.location.href. 则会提示404
var promise = fetch('/registerdfdfd', {
method: 'post',
body: userObjStr,
headers: {
'Content-Type': 'application/json'
}
}).then(registrationSuccessful, registrationFailed);
function registrationSuccessful() {
window.location.href = '/profile/profile.template.client.html';
}
function registrationFailed() {
alert("oops")
}
}