click functionality to be called in html

安稳与你 提交于 2020-01-06 08:29:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!