function test(){
var obj = window.open('doc/test.doc',null,'top=50,left=100,width=800,height=600,toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0');
var tip = "test";

if(confirm(tip)){
    alert('請選擇(1)');
}
else{
             obj.window.close();//你这句不太明白
    window.location.href="accountAppa.aspx"; }
}
obj返回的是打开窗口的句柄,想关闭的话直接obj.close();
关闭父窗口的话就用obj.opener.close();