var pop=window.open("目标页.html","","");
var path=pop.location.href;//得到打开的页的路径+名称
var zhi=path.lastIndexOf("/");//定位名称
var name=path.substring(zhi+1);//获得名称
if(name=="目标页.html"){//此处判断不能这样写 ,要写成字符串比较
alert("成功打开了");
}else{
alert("没打开,另开一页");
pop.location.href="另开的页.html"
}