参考这个 例子http://www.cnblogs.com/jackyrong/archive/2005/06/12/172943.html
解决方案 »
- 一个javascript幻灯片无法显示的问题,什么原因??
- @------------如何用javascript自动计算多个同名input输入框输入的数字之和
- asp.net 中用Javascript的对联式广告怎么不能用呀
- 谁有用js写的文章编辑器的例子
- 一个变量定义的问题,高手请进.
- 问题:if(top==self)document.location="manage.asp";
- 怎样做一个可编辑的Select呢?
- 求援:如何控制文档的显示方式?
- 这句jquery 怎么不起作用
- 为什么js无效
- 非常奇怪的问题,Javascript在localhost调试通过, 放到服务器就不行!!
- js正则高手进,验证一段文本,求高效率的正则写法
rt = showModalDialog('child.htm',self,''); //把窗口本身传给child,child里就可以通过它引用任何DOM对象child.htm
win = dialogArguments; //取得父窗口即self或window
win.location.reload()即刷新父窗口
returnValue = "xxx" //传回给主窗口rt的值,可以是对象
<head >
<title>未命名頁面</title>
</head>
<body>
<script type="text/javascript">
function fnOpen(){
var strReturn = window.showModalDialog("Default9.aspx", true);
if(strReturn!='')
{
alert(strReturn);
window.location.reload();
}
}
</script>
<form >
<input TYPE="button" VALUE="Push To Create" onclick="fnOpen()">
</form>
</body>
</html>
开窗页:<html >
<head runat="server">
<title>未命名頁面</title>
<script type="text/javascript">
function fnClose()
{
window.returnValue = "ssss";
window.close();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Button1" type="button" value="button" onclick="fnClose()"/></div>
</form>
</body>
</html>