Heim > Web-Frontend > js-Tutorial > window.open 以post方式传递参数示例代码_javascript技巧

window.open 以post方式传递参数示例代码_javascript技巧

WBOY
Freigeben: 2016-05-16 16:57:57
Original
1148 Leute haben es durchsucht
复制代码 代码如下:

//打开新页面并利用post方式传递参数
function openNewPageWithPostData(postAddress,opentype,paramNames,paramValues)
{
var newWindow = window.open(postAddress,opentype);
if (!newWindow)
{
return false;
}

var postDataHtml="";
postDataHtml = postDataHtml + "
";

if (paramNames && paramValues && (paramNames.length == paramValues.length))
{
for(var i=0 ; i{
postDataHtml = postDataHtml + "";
}
}

postDataHtml = postDataHtml + "
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage