我写了个JS:

// JavaScript Document

window.onload=initAll;

function initAll()
{
    document.getElementById("SelectDept").onclick=initRedirect;
}

function initRedirect()
{
    window.open("SelectDept.php","请选择部门","width=300,height=300");

//如果不写下面这句,则主窗口也会定位为SelectDept.php.
    return false;
}

SelectDept是:

<a href="../SelectDept.php"  id="SelectDept" >选择</a>

在IE中弹不出窗口,在FireFox正常,不知道是怎么回事.

后来查询,发现在链接中加入  target="_blank"就可以了.

<a href="../SelectDept.php"  id="SelectDept"  target="_blank">选择</a>

posted on 2009-06-03 20:23  garfieldtom  阅读(183)  评论(0编辑  收藏  举报