【发布时间】:2015-12-25 01:27:32
【问题描述】:
我有一个应用程序,在信息窗口中,会出现一个“更多信息”按钮,用于打开模式视图。代码是:
(function(marker, data) {// Attaching a click event to the current marker
google.maps.event.addListener(marker, "click", function() {
geocoder.geocode({'latLng': marker.position}, function(results, status) {
if(status == google.maps.GeocoderStatus.OK) {
if (results[0]) { //defino la direccion
address = results[0].formatted_address;
info = '<h4>' + marker.title + '</h4><h4>'+ address+'</h4>';
var content = document.createElement('div'),button;
content.innerHTML = info + '<br/>';
button = content.appendChild(document.createElement('input'));
button.type = 'button';
button.value = 'More info';
google.maps.event.addDomListener(button, 'click', function () {
offsetCenter(marker,data);
})
infoWindow.setContent(content);
我的问题是关于按钮的样式。如何添加样式类似于模式引导按钮(即 btn-primary 类按钮)的按钮?
【问题讨论】:
标签: javascript bootstrap-modal infowindow