动态删除div
thenew.parentnode.removeChild(thenew)
var _div=document.getElementById('div_id');
_div.parentNode.removeChild(_div);
document.getElementById('div_id').style.display='';
获取 input 值
var title=document.getElementById("title").value;
var linkid = "link"+i;
side_bar_html = '<div id="'+linkid+'"><a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + title + '</a> <span class="location_right">' + lat +' '+ lng+'</span><a href="javascript:mydelete(' + (gmarkers.length-1) + ')">' + title + '</a><br></div>';
i++;
document.getElementById("side_bar").innerHTML += side_bar_html;
function myclick(i) {
google.maps.event.trigger(gmarkers[i], "click");
}
function mydelete(i) {
var linkid1 = "link"+i;
// document.getElementById('linkid1').parentNode.removeChild(document.getElementById('linkid1'));
var _div=document.getElementById(linkid1);
_div.parentNode.removeChild(_div);
gmarkers[i].setMap(null);
}