通过window.open(url);//url是要打开的页面的绝对地址,也可以是通过action获取到的地址,可以传参数。
例如window.open('devCheckPlanAction!toPrint.action?recordId=${vo.checkPlanId}')打开子窗口,
通过window.opener.location.reload();刷新父窗口,然后通过window.close()关闭子窗口。
例如:
<html>
<head>
<script type="text/javascript">
function doClose(){
window.opener.location.reload();
window.close();
}
<script>
</head>
<body>
<a onclick="doClose()" >关闭</a>
<a href="#" target="_self" onclick="window.open('devCheckPlanAction!toPrint.action?recordId=${vo.checkPlanId}')" >打开子窗口</a>
</body>
</html>

3768

被折叠的 条评论
为什么被折叠?



