//"listingtype":"FixedPriceItem" VariationFixedPrice
$("#priceandAccountBtn").click(function(){
var selectRows=$("#itemdetailTab").datagrid("getChecked");
var typeflog=true;
if(selectRows.length>0){
var listingtype=selectRows[0].listingtype;
for(var i=1; i
if(listingtype!=selectRows[i].listingtype){
typeflog=false;
break;
}
}
if(typeflog){
if(listingtype=="VariationFixedPrice"){
if(selectRows.length>1){
$.messager.alert("提示","VariationFixedPrice类型不支持多选!")
}else{ //多款式
openPostWindow("updatepriceorcount/updateVaraPriceOrQuantity.jsp?varaflog=vara", selectRows,'_blank');
}
}else if(listingtype=="Chinese"){ // 拍卖
openPostWindow("updatepriceorcount/updateChinesePrice.jsp", selectRows,'_blank')
}else{ //单款式
openPostWindow("updatepriceorcount/updatepriceorquantity.jsp", selectRows,'_blank');
}
}else{
$.messager.alert("提示","不可以同时选择不同的类型!!");
}
}else{
$.messager.alert("提示","请选择产品!");
}
});
function openPostWindow(url, data,name)
{
var tempForm = document_createElement_x_x_x_x_x("form");
tempForm.id="tempForm1";
tempForm.method="post";
tempForm.action=url;
tempForm.target=name;
var hideInput = document_createElement_x_x_x_x_x("input");
hideInput.type="text";
hideInput.id="hiddenInputId";
hideInput.name="content"
hideInput.value= JSON.stringify(data);
tempForm.a(hideInput);
if(document.all){
tempForm.attachEvent("onsubmit",function(){}); //IE
}else{
var subObj = tempForm.addEventListener("submit",function(){},false); //firefox
}
document.body.a(tempForm); //动态生成一个HTML对象
if(document.all){
tempForm.fireEvent("onsubmit");
}else{
tempForm.dispatchEvent(new Event("submit"));
}
//alert("3:"+JSON.stringify($("#hiddenInputId").val()));
tempForm.submit();
document.body.removeChild(tempForm);
}
跳转后的JSP页面接收值
<%
String content=request.getParameter("content");
%>
<input type="hidden" id="lodeDataInput" value='<%=content%>'/>
不同的JSP页面传值POST形式
猜你喜欢
转载自blog.csdn.net/maying0124/article/details/80679438
今日推荐
周排行