<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title><!--网页标题加入访问用户当前的城市名-参数请空-->
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=6yAoynmTPNlTBa8z1X4LfwGE"></script>
</head>
<body>
<div id="bdMapBox" style="display:none;"></div>
<script type="text/javascript">
// 百度地图API功能
var map = new BMap.Map("bdMapBox");
var nowCity = new BMap.LocalCity();
nowCity.get(bdGetPosition);
function bdGetPosition(result){
var cityName = result.name; //当前的城市名
/*自定义代码*/
document.title = cityName+"123456789";
/*"123456789"城市名后自定义网页标题参数*/
}
</script>
</body>
</html>
效果图: