I have a set of the span tags like .
<span id="q_1" >D1</span>
<span id="q_2" >D2</span>
<span id="q_3" >D3</span>
How can i get the ids of the span tags with the help of the jquery.The numbers 1,2,3 are generated run time.so the basic structure that i have is
<span id="q_" ></span>
I have a feeling you’re actually asking how to select all elements that have an id that starts with “q_”. If so, the simplest way to do so is like this:
See example →