Ctrl+/
IE11
F11
ESC
PgUp
PgDn
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>网页宽屏和窄屏无刷新切换效果</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<style type="text/css">
body{margin:0;padding:0;}
div{background:red;height:500px;margin:0 auto;}
.nar_box{width:1000px;}
</style>
<script>
window.onload = function (){
var oBox = document.getElementsByTagName("div")[0];
var oBtn = document.getElementsByTagName("button")[0];
oBtn.onclick = function (){
if (oBox.className == "wide_box"){oBox.className = "nar_box";oBtn.innerHTML = "切换宽屏"}else{ oBox.className = "wide_box";oBtn.innerHTML = "切换窄屏"}
}
</script>
</head>
<body>
<button>切换窄屏</button>
<div class="wide_box"></div>
</body>
</html>
CSS代码...
JS代码...
xxxxxxxxxx