日期:2014-05-18 浏览次数:20585 次
<script type="text/javascript">
function closeWindow() {
var appName = navigator.appName;
if (appName == "Microsoft Internet Explorer") {
window.close();
}
else {
//window.opener = null;
window.open(window.location.href, "_self",'');
window.close();
}
//在 chrome 、IE 没问题 ,在FF中无效,难道必须手动修改FF配置??
}
</script>
<script type="text/javascript">
function CloseWebPage() {
if (navigator.userAgent.indexOf("MSIE") > 0) {
if (navigator.userAgent.indexOf("MSIE 6.0") > 0) {
window.opener = null; window.close();
}
else {
window.open('', '_top'); window.top.close();
}
}
else if (navigator.userAgent.indexOf("Firefox") > 0) {
window.location.href = 'about:blank ';
//window.history.go(-2);
}
else {
window.opener = null;
window.open('', '_self', '');
window.close();
}
}
</script>
------解决方案--------------------