<div id="map"> </div> <script language="javascript"> var browserWindow = $(window); var width = browserWindow.width(); var height = browserWindow.height(); var size = "width:" + width + "px; height:" + height + "px"; document.getElementById('map').style = size; </script>
var browserWindow = $(window); var width = browserWindow.width(); var height = browserWindow.height(); document.getElementById('map').style.width = width + 'px'; document.getElementById('map').style.height = height + 'px';
var browserWindow = $(window); var width = browserWindow.width(); var height = browserWindow.height(); $('#map').css({ 'width': width + 'px', 'height': height + 'px' });
$("#map") .width($(window).width()) .height($(window).height());
document.getElementById('map').style = size;
document.getElementById('map').style.cssText = size;
<style> #example { width: 100px; height: 100px; background-color: blue; } </style> <div id="example"></div> <button onclick="document.getElementById('example').style = 'background-color: red;'">Перекрасить в красный</button> <button onclick="document.getElementById('example').style = 'background-color: blue;'">Перекрасить в синий</button>