日期:2014-05-16  浏览次数:20421 次

运行该HTML之后,点击全屏按钮,出现错误“large()函数未定义”,百思不得其解,求高手指教
运行该HTML之后,点击全屏按钮,出现错误“large()函数未定义”,百思不得其解,求高手指教
源代码全文如下:

<!DOCTYPE html>
<html>
<head>
  <title>Google Maps JavaScript API v3 Example: Map Simple</title>
  <meta name ="viewport" content ="initial-scale=1.0,user-scalable=no" />
  <meta charset="UTF-8">
  <style type="text/css">
  html{margin:0; overflow:hidden; padding:0 0 0 0; _border:0; }  
  body{margin:0; height:100%; border:0;}  
  #header {position:absolute; top:0; left:0; width:100%; height:15%;border-bottom:solid 0.5px rgb(200,200,200); background-color:rgb(255,255,255); } 
  #left_content{position:absolute; width:25%; top:15%; bottom:0; left:0;border-right:solid 0.5px rgb(200,200,200); background-color:rgb(255,255,255);}
#map_canvas{position:absolute;top:15%; bottom:0; left:25%; right:0; background-color:rgb(200,200,200);}
   
  </style>
  <script>
  function Large(){
  document.getElementById("map_canvas").style.width = screen.width;
  document.getElementById("map_canvas").style.height = screen.height;
  document.getElementById("map_canvas").style.left = 0;
  document.getElementById("map_canvas").style.right = 0;
  document.getElementById("map_canvas").style.top = 0;
  document.getElementById("header").style.display = 'none';
  document.getElementById("left_content").style.display = 'none';
  document.onkeydown = function esc()
  {
  // ESCAPE key pressed  
  if (event.keyCode == 27) {
  document.getElementById("header").style.display = 'block';
  document.getElementById("left_content").style.display = 'block';
  document.getElementById("map_canvas").style.top=15%;
  document.getElementById("map_canvas").style.bottom=0;
  document.getElementById ("map_canvas").style.left=25%;
  document .getElementById ("map_canvas").style.right=0;
  }
  }; 
  }
  </script>
  <script type="text/javascript" 
  src ="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
  <script type="text/javascript">
  var map;
  function initialize() {
  var myOptions = {
  zoom: 8,
  center: new google.maps.LatLng(-34.397, 150.644),
  panControl: false,
  zoomControl: false,
  scaleControl: true, 
  overviewMapControl:true,
  scaleControlOptions: { position: google.maps.ControlPosition.TOP_LEFT },  
  mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  map = new google.maps.Map(document.getElementById('map_canvas'),
  myOptions);
  }
  google.maps.event.addDomListener(window, 'load', initialize);
  </script>
</head>
<body>
  <div id="left_content">
&nb