---
title: "Javascript在IE下控制浏览器全屏"
author: "cisumer"
date: "2016-06-23T16:07:47Z"
tags: []
categories: ["Web前端"]
slug: "javascript-ie"
draft: false
lastmod: "2016-06-23T16:16:22Z"
id: 2306918
url: "https://cisumer.iteye.com/blog/2306918"
---

```js
		jQuery("#fullBtn").text(" 全屏显示");	
		function fullscreen(){
				//模拟F11
				var WsShell = new ActiveXObject('WScript.Shell')
     			WsShell.SendKeys('{F11}');
     			//全屏状态下
				if(isFull=="full"){
					jQuery(parent._ChildMenu).show();
					jQuery(parent._TableHeader).show();
					jQuery("#fullBtn").text(" 全屏显示");
					isFull="";
					return;
				}
     			//
				jQuery(parent._ChildMenu).hide();
				jQuery(parent._TableHeader).hide();
				jQuery("#fullBtn").text(" 退出全屏");
				isFull="full";
		}
```