How to create a radio button dynamically with jQuery?

后端 未结 8 1086
南方客
南方客 2020-12-08 22:25

I am developing a small application in which I want to create 20 radio buttons in one row.

How can I do this using jQuery?

8条回答
  •  盖世英雄少女心
    2020-12-08 22:42

    Assuming that you have a div with the ID=myDivContainer try this:

    for (i=0;i<=20;i++)
    {
    $("#myDivContainer").append('')
    }
    

提交回复
热议问题