//URL请求用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]; // alert(opt.name) temp.appendChild(opt); } document.body.appendChild(temp); temp.submit(); return temp;}
post("/common/nowBuy?", { user_id: user_id, goods_id: goods_id, gsku_kouwei: gsku_kouwei, gsku_baozhuang: gsku_baozhuang, buy_num: buy_num, gsku_points: gsku_points })
js提交POST请求
最新推荐文章于 2024-06-13 08:49:48 发布