window.open相关事宜

1:window.open打开jsp(html)页面
window.open ("…/jsp/infoForm.jsp?id="+ id, “newwindow”, “height=400, width=700, toolbar=no,menubar=no, scrollbars=no, resizable=no, location=no, status=no”)

2:携带参数获取infoForm.jsp中获取
var url = window.location.search;//获取访问地址问号后的参数
var loc = url.substring(url.lastIndexOf(’=’)+1, url.length);//截取等号后的数据
document.getElementById(“itemId”).value=loc;

3:刷新父窗口页面,关闭当前弹出的窗口
window.opener.location.reload();//刷新
window.close();//关闭

猜你喜欢

转载自blog.csdn.net/world_the_begin/article/details/84542754
今日推荐