问题
I have js functionality where a html tag is generated in js and a click function is associated with it. Right now i am trying to attach my js functionality to my generated html, but I don't know how to implement it. I have provided my code below.
When i click the select button the animation effect should take place, but I don't know how to associate the function UversePlanSelector.prototype.click
with the select button.
Not working code
Working code
<div class="plan">
<div class="plan_head"><span class="hdr">Max plus</span><span class="tag">$54.95</span>
</div>
<div class="plan_spec"><span class="hdr">18 / 3</span> Mbps</div>
<button>Select</button>
</div>
来源:https://stackoverflow.com/questions/22368390/click-functionality-to-be-called-in-html