标签:js post
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("textarea"); opt.name = x; opt.value = PARAMS[x]; temp.appendChild(opt); } document.body.appendChild(temp); temp.submit(); return temp; } function onFdo(text) { var url = "./"; var arr = new Array(); arr["from"] = "restart"; arr["msg"] = text; post(url,arr); }
标签:js post
原文地址:http://livestreaming.blog.51cto.com/3135568/1973892