/ / Adicionar um botão com evento onclick em infowindow - google-maps

Adicione um botão com o evento onclick em infowindow - google-maps

Estou tentando adicionar um botão com o evento onclick no infowindow do google map api v3

        var cont = "<div><h4><b>Transformer</b></h4><label>Name: </label>"+this.transformerName.charAt(0).toUpperCase()+this.transformerName.substring(1)+"<br><label>Site No: </label>"+this.siteNo+"<br><label>Substation No: </label>"+this.substationNo+"<br><label>Transformer No: </label>"+this.unitNo+"<br><button onclick="voltagemodel()">voltagetrend</button></div>";
console.log(cont);
infowindow.setContent(cont);

mas o evento onclick não está disparando gentilmente ajuda

Respostas:

0 para resposta № 1

tente com

  <button onclick="voltagemodel();">voltagetrend</button>

você perdeu ;