window.open以post方式传递参数示例代码_javascript技巧
来源:爱滋美食网
代码如下:
//打开新页面并利用post方式传递参数
function openNewPageWithPostData(postAddress,opentype,paramNames,paramValues)
{
var newWindow = window.open(postAddress,opentype);
if (!newWindow)
{
return false;
} var postDataHtml="
";
postDataHtml = postDataHtml + " document.getElementById(\"postDataForm\").submit()";
newWindow.document.write(html);
return newWindow;
}
显示全文