我是代码
function post(url, params) {
var temp = document.createElement("form");
temp.action = url;
temp.method = "post";
temp.style.display = "none";
for (var x in params) {
var opt = document.createElement("input");
opt.name = x;
opt.value = params[x];
temp.appendChild(opt);
}
document.body.appendChild(temp);
temp.submit();
return temp;
}
调用例子
var myUrl ="http://bosonnlp.com/analysis/ner?category=&sensitivity=3";
var a = post(myUrl,{data: "今天早上七点,我要去学校"});