function showBorad(title,content)
{
var showggbt = title; //注这里都可以显示值
var showggnr = content;
if(w==undefined || w==null)
{
var w = window.open('gonggao.jsp?title='+showggbt+'&content='+showggnr,'公告','width=490,height=300,screenX=120,screenY=200');
}
else
{
w.focus();
}
}在子窗口中对location.href进行分析,就可以得到新的title和content
{
var showggbt = title; //注这里都可以显示值
var showggnr = content;
if(w==undefined || w==null)
{
var w = window.open('gonggao.jsp?title='+showggbt+'&content='+showggnr,'公告','width=490,height=300,screenX=120,screenY=200');
}
else
{
w.focus();
}
}在子窗口中对location.href进行分析,就可以得到新的title和content
<Script Language="JavaScript">
window.open("index.htm");
function test()
{
alert("test by stefli");
}
</Script>Child:
<body onload="opener.test();">
</body>
你说的这种方法不行,我的数据太多了,里面有不规则的字符,所以那种传值是不行的。