There are many input elements which IDs are
question5,question6, question7
,…, how to select these input elements using Jquery?
I do not mean $('#question5'), I mean to select the group of them.
Also How to get the the last number like 5,6,7,… using Jquery?
Try this:
It will match input elements that have an
idattribute that begin withquestion.Once you have the elements, you can simply do a javascript substring on them to find the number: