当前位置:首页>网络学院>网页制作>Javascript教程>文章内容

用Javascript实现父窗体的更新

[ 来源:www.it55.com | 作者: | 时间:2007-07-12 | 收藏 | 推荐 ] 【

Response.Write("<script language='javascript'>window.opener.location=window.opener.location.href;</script>")

IT资讯之家 www.it55.com


第一种方案是:
file a.htm

IT资讯之家 www.it55.com

function OpenDialog(url,param)
{
return window.open(url,param, "DialogWidth:450px;DialogHeight:450px;help:no;status:no");
} www.it55.com在线教程


file b.htm
<script language="javascript">
function js_do(val)
{
self.opener.document.all.filename.value=val
}
</script>

免费资源www.it55.com

第二种方案是:
file A.htm
<html>
<script language="javascript">
function OpenDialog(url,param)
{
       return window.showModalDialog(url,param, "DialogWidth:450px;DialogHeight:450px;help:no;status:no");
}

IT资讯之家 www.it55.com

function js_getData(url)
{
return OpenDialog("b.htm","");
} www.it55.com在线教程

</script>
<body>
<form name="myFrm">
<input type="text" name="filename" onclick="this.value=js_getData()">
</form>
</body>
</html> sflj www.it55.com kg^&fgd

file b.htm

www.it55.com在线教程

<html>
<script language="javascript">
function js_do(val)
{
window.returnValue=val;
window.close();
}
</script>
<body>
<form name="myFrm">
<input type="text" name="filename">
<input type="text" name="btnDo" onclick="js_do(this.form.filename.value)">
</form>
</body>
</html>

www.it55.com在线教程

Response.Write("<script language='javascript'>window.opener.document.all.txt1.value="+theValue+";</script>"); 45398 www.it55.com it55学习IT知识,享受IT生活 4dfkjn

(阅读次数:

返回顶部
 

网友评论

[以下评论为网友观点,不代表本站。请自觉遵守互联网相关政策法规,所有连带责任均有评论者自负。]
[不超过250字]

热门文章