Here is a piece of code:

myMap.balloon.events.add('click', function (e) { //// }); 

According to it, I define a click inside the balun, I have a button inside it, when I click inside the balun, I need to determine in the script that there was a click on the button, generally use .hasClass or .attr

Or is it better to register onclick = "" in the tag of the button itself?

  • Look at this example , there is just a balun with a button - Reni
  • @Reni write the answer, it is more useful than a comment with a link. The link resource may not be available over time. - Alex

0