Access dynamically created items using jQuery?

后端 未结 6 1525
说谎
说谎 2020-12-19 13:13

I have a page where some html is being dynamically added to the page.

This is the html and javascript that is created:

6条回答
  •  臣服心动
    2020-12-19 14:07

    The problem in your code is that you are attaching the event to the button before the button is being created.

    Correct version is:

      
    Button

    This should do the job.

提交回复
热议问题