<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title></title>    <script src="http://ditu.google.cn/maps?file=api&amp;v=2&amp;key=abcdefg &hl=zh-CN"
        type="text/javascript"></script>    <script type="text/javascript">   
     var map = null; 
     var geocoder = null; 
      function initialize() { 
           if (GBrowserIsCompatible()) { 
                geocoder = new GClientGeocoder(); 
               map = new GMap2(document.getElementById("map"));   
               map.setCenter(new GLatLng(38.8739720,115.4646300 ), 4);
               GEvent.addListener(map, "click", function() {
               alert("You clicked the map.");});
               //添加工具    
               map.addControl(new GMapTypeControl());
    map.addControl(new GLargeMapControl());
    map.enableScrollWheelZoom();
           }                 
        }
           function showLocation() { 
                // 清除er                     
                map.clearOverlays();                   

                var address = document.getElementById("txtAddress").value;  
                         
                geocoder.getLocations(address, cb_showLocation); 
           }           function cb_showLocation(result) {                
                // 顯示結果    
                if (result.Status.code == G_GEO_SUCCESS) {      
                //成功                     
                 
                for (var i=0; i<result.Place.length; i++) {                                
                    var lat = result.Place[i].Point.coordinates[1]; // lat                                
                    var lng = result.Place[i].Point.coordinates[0]; // lng 
                    var address = result.Place[i].address; // 地址 
                    map.setCenter(new GLatLng(lat,lng), 14);                             
                    var point = new GLatLng(lat,lng);                     
                    var er=new GMarker(point, {title:i+1});; 
                    map.addOverlay(er);                           
                    } // for 
                } // if             }         var status=[]; 
        status[G_GEO_SUCCESS]            = "Success"; 
        status[G_GEO_MISSING_ADDRESS]    = "Missing Address"; 
        status[G_GEO_UNKNOWN_ADDRESS]    = "Unknown Address"; 
        status[G_GEO_UNAVAILABLE_ADDRESS]= "Unavailable Address"; 
        status[G_GEO_BAD_KEY]            = "Bad Key"; 
        status[G_GEO_TOO_MANY_QUERIES]   = "Too Many Queries"; 
        status[G_GEO_SERVER_ERROR]       = "Server Error";
    </script></head>
<body onload="initialize()" onunload="GUnload()">
    <input id="txtAddress" type="text" />
<input id="Button1" type="button" value="button" onclick="showLocation()" />
    <div id="map" style="width: 1000px; height: 600px"></div>
    </div>
</body>
</html>
这个是VC内嵌HTML的脚本代码,想通过VC窗口输入地名,地图对应查找并显示到对应的地址,使用CWebBrowser2控件,现在VC程序里已经能够遍历HEML元素,,上面这段代码改如何修改才能满足我的需求。