【发布时间】:2012-02-15 23:18:22
【问题描述】:
当用户点击文件上传中的取消按钮时,我们需要关闭弹出窗口本身。
- main.html
- popup.html
popup.html 包含<input type="file"。
现在我们有一个要求,当用户点击文件上传窗口中的取消按钮时popup.html也应该关闭。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="javascript">
function openModalDlg() {
window.open( "test.html", "", 'width=400,height=100');
}
</script>
</head>
<body>
<p>
Click
<a href="#" onclick="openModalDlg();">here</a>
to open modal dialog
</p>
</body>
</html>
【问题讨论】:
-
Main.html
点击这里打开模态对话框
标签: javascript