http://topic.csdn.net/u/20090226/17/19ff150a-e000-407d-a24b-d0ea88804999.html 查看吧
解决方案 »
- 想用xhtmlgrid做一个分页,请教
- jquery.comet.js 这个插件个什么玩意?能用吗?
- javascript的一段代码找错
- JavaScript跑马灯 运行无结果
- JavaScript中settimeout的问题~
- js设置不了图片热区
- JS得到某个参数值的问题。
- 求助:弹出窗口最小化后,如何再重新显示呢?
- 求助:如何打开另一个页框的内容?
- 请教向二维数组子节点追加问题
- ajax 在g_xmlhttp.onreadystatechange = callbackfunc; 之后, callbackfunc 没有被调用
- 请问如何控制页面,让屏幕显示页面想要呈现的部分,而不是从顶部开始?
......
form.target="_parent";
form.submit();
window.close();模式子窗体,点查询时把检索条件传到父画面,父画面提交检索,刷新画面。
<html>
<body>
<input type="text" value="1" id="t1">
<input type="button" value="打开子窗口" onclick="openDialog()"><script language="javascript">
function openDialog()
{
var sFeatures = "dialogWidth:600px; dialogHeight:400px;";
var args = [window];
window.showModalDialog("child.html", args, sFeatures);
}
function doRefresh()
{
t1.value = parseInt(t1.value) + 1;
}
</script>
</body>
</html>子页面
<html>
<body>
<input type="button" value="关闭" onclick="doClose()"><script language="javascript">
function doClose()
{
window.dialogArguments[0].doRefresh();
self.close();
}
</script>
</body>
</html>
<head>
<script>
var a;
function clos(){
if(a.closed)
window.location.href=window.location.href;
}</script>
</head>
<body>
<input type='text' id='a' value='测试的时候把这里改了.' />
<button onclick="a=window.open('test.html');setInterval('clos()',1000);">aaa</button>
</body>
</html>opener只能用在frame.如果用window.open的就无效了.
如:
function addCCTV(){
var url="*******";
window.open(url,"DialogValue","width=600,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=0");
window.location.reload(true);
}如果打开的是非模态窗口刷新语句就要变了
在父窗口中有如下代码
function addCCTV(){
var url="*******";
window.open(url,"DialogValue","width=600,height=500,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=0");
}子窗中onUnload执行一下代码 opener.window.search.submit();