---
title: "js关闭浏览器 (不弹出提示框)"
author: "wangcheng"
date: "2008-08-11T15:11:33Z"
tags: ["浏览器"]
slug: "js"
draft: false
lastmod: "2008-08-11T15:11:33Z"
id: 226624
url: "https://wangcheng.iteye.com/blog/226624"
---

使用IE7，关闭浏览器时，会弹出一个提示框

 

解决方法：

```
function closeWindow() {
    window.opener = null;
    window.open('', '_self', '');
    window.close();
}
```