请选择 进入手机版 | 继续访问电脑版

别让梦枯萎

别让梦枯萎 首页 专业知识 jquery/js 查看内容

百度地图全屏显示

2016-11-7 11:47| 发布者: wangqiang| 查看: 243| 评论: 0

摘要: 百度地图全屏显示,直接上代码: !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/xhtm ...
百度地图全屏显示,直接上代码:

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>简单的html5 File测试 for pic2base64</title>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=CrmLGQcIzOny7WPB3uPn7GRC"></script>
<style>
</style>
<script>
window.onload = function(){
alert(document.documentElement.clientHeight);
document.getElementsByTagName("body")[0].style.height = document.documentElement.clientHeight + "px";

var mp = new BMap.Map('map');  
mp.centerAndZoom(new BMap.Point(114.509294,38.042996), 11);  
mp.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放


}
</script>
</head>
<body style="margin:0px; padding:0px;">
<div id="map" style="width:100%;height:100%;"></div>
</body>
</html> 

鲜花

握手

雷人

路过

鸡蛋

最新评论

QQ|Archiver|手机版|小黑屋|别让梦枯萎 ( 闽ICP备16009502

GMT+8, 2018-11-21 05:28 , Processed in 0.125000 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.2 © 2001-2013 Comsenz Inc.

Designed by adminbuy.cn