新开窗口
// 调用 openNewWin(url)
<script type="text/javascript">
var newWinObj = null;
function openNewWin(url)
{
if(window.opener&&window.opener==newWinObj)
{
window.opener.location=url;
}
//以下代码实现 只打开一个窗口
else if(newWinObj == null || newWinObj.closed)
{
newWinObj = window.open(url);
}
else
{
newWinObj.location=url;
}
}
</script>
// 调用 openNewWin(url)
<script type="text/javascript">
var newWinObj = null;
function openNewWin(url)
{
if(window.opener&&window.opener==newWinObj)
{
window.opener.location=url;
}
//以下代码实现 只打开一个窗口
else if(newWinObj == null || newWinObj.closed)
{
newWinObj = window.open(url);
}
else
{
newWinObj.location=url;
}
}
</script>