百度地图和js操作iframe

document.getElementById("ifarme-63").contentWindow.document.getElementById("qksv").value = '1';
        document.getElementById("ifarme-63").contentWindow.document.getElementById("hfDateStart").value = '20150101';
        document.getElementById("ifarme-63").contentWindow.document.getElementById("txtIndex_Dn_KeyWord").value = $("#quick").val();
        document.getElementById("ifarme-63").contentWindow.document.getElementById("pc").value = "";
        document.getElementById("ifarme-63").contentWindow.document.getElementById("qkcd").click();
        document.getElementById("ifarme-63").contentWindow.document.getElementById("qkci").click();
        document.getElementById("ifarme-63").contentWindow.document.getElementById("quick").click();
var map = new BMap.Map("map"); 
var point = new BMap.Point(121.333502, 37.555578);  
map.centerAndZoom(point, 13);
map.enableScrollWheelZoom(true);
map.clearOverlays();
    $.post("/Handler/Fdata.ashx", { med: 'Map' }, function (json) {
        var obj = eval('(' + json + ')');
        obj.forEach(function (e) {
            var marker = new BMap.Marker(new BMap.Point(e.LONGITUDE, e.LATITUDE));
            map.addOverlay(marker);
            var label = new BMap.Label(e.ACCOUNT_NAME, { offset: new BMap.Size(20, -10) });
            marker.setLabel(label);
        })
    })
<script src="http://api.map.baidu.com/api?v=1.5&ak=cnX8K8wveewWSn8SYad9qLYH" type="text/javascript"></script>

 

你可能感兴趣的:(百度地图和js操作iframe)