标签:lis else method tac pos patch rem bsp attach
function openPostWindow (url,name, data1, data2)
{
var tempForm = document.createElement("form");
tempForm.id = "tempForm1";
tempForm.method = "post";
tempForm.action = url;
tempForm.target=name;
var hideInput1 = document.createElement("input");
hideInput1.type = "hidden";
hideInput1.name="data1";
hideInput1.value = data1;
var hideInput2 = document.createElement("input");
hideInput2.type = "hidden";
hideInput2.name="data2";
hideInput2.value = data2;
tempForm.appendChild(hideInput1);
tempForm.appendChild(hideInput2);
if(document.all)
{
tempForm.attachEvent("onsubmit",function(){}); //IE
}
else
{
var subObj = tempForm.addEventListener("submit",function(){},false); //firefox
}
document.body.appendChild(tempForm);
if(document.all)
{
tempForm.fireEvent("onsubmit");
}
else
{
tempForm.dispatchEvent(new Event("submit"));
}
tempForm.submit();
document.body.removeChild(tempForm);
}
标签:lis else method tac pos patch rem bsp attach
原文地址:http://www.cnblogs.com/small8/p/6251680.html