每当我运行我的代码时,我都会收到错误{"error": "Please use POST request"}
有人知道这个错误是什么意思吗?我在 jsfiddle 中的代码:http: //jsfiddle.net/Aidoboy/AdzwC/12/
代码:
/*jslint browser: true, devel: true */
function Submit() {
//"use strict";
alert("running");
document.forms.form.submit();
var owed = 0;
function calc(n, o) {
if (n >= 90) {
owed = owed + 1;
if (n >= 95) {
owed = owed + 1;
}
}
else if (o >= 80) {
owed = owed + 0.5;
}
if (n > o) {
owed = owed + 0.5 * (n - o);
}
if (n < o) {
if (n < 95) {
owed = owed - 0.25;
}
}
if (n == 94) {
if (o == 97) {
owed = owed + 0.25;
}
}
}
calc(form.Math.value, form.OMath.value);
calc(form.Sci.value, form.OSci.value);
calc(form.ELA.value, form.OELA.value);
calc(form.SS.value, form.OSS.value);
calc(form.Elec1.value, form.OElec1.value);
calc(form.Elec2.value, form.OElec2.value);
calc(form.Elec3.value, form.OElec3.value);
calc(form.Elem1.value, form.OElem1.value);
calc(form.Elem2.value, form.OElem2.value);
calc(form.Elem3.value, form.OElem3.value);
alert(Owed);
}