if(typeof(window.opener)!='object') 
 
{ 
 
    alert('主窗体存在') 
 
}