How do I select an element in jQuery by using a variable for the ID?

前端 未结 6 1179
野的像风
野的像风 2021-01-30 03:59

For example, the following selects a division with id=\"2\":

row = $(\"body\").find(\"#2\");

How do I do something like this:

r         


        
6条回答
提交回复
热议问题