关闭窗口不弹出提示对话框--ie6 和ie7

<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>

用window.close关闭窗口会弹出确认对话框,

//for ie6
function closeie6(){
window.opener=null;
window.close();
}

//for ie7
function closeie7(){
window.open('','_top');
window.top.close();
}

function closeForIEVersion(){
if(navigator.appName == "Microsoft Internet Explorer"){
if(navigator.appVersion.match(/7./i)=='7.'){
closeie7();
}
if(navigator.appVersion.match(/6./i)=='6.'){
closeie6();
}
}
}

你可能感兴趣的:(C++,c,Microsoft,C#)