[ 来源: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>
第二种方案是:
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>
Response.Write("<script language='javascript'>window.opener.document.all.txt1.value="+theValue+";</script>"); 45398 www.it55.com it55学习IT知识,享受IT生活 4dfkjn
(阅读次数:)