用javascript父窗口控制只弹出一个子窗口

2019-06-02 22:49:12王冬梅

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="JavaScript" type="text/JavaScript">
<!--  Copyright fenggang at 2007/3/23
var w=null;
function MM_openBrWindow(theURL,winName,features) { //v2.0
  if(w!=undefined&&isOpen()){
   w.close();
  }
   w=window.open("",winName,features);
   w.location.replace(theURL);
}
function isOpen()
{
  try
  {
  w.document;
  return true;
  }
  catch(ex)
  {}

  return false;
}
//-->
</script>
</head>
<body>
<a href="javascript:;" onClick="MM_openBrWindow(show.asp’,’’,’scrollbars=yes,resizable=yes,width=570,height=500’)">title</a>
</body>
</html>