specific id replaced by [this.id]

specific id replaced by [this.id]

... while entangled in a complex formula
  1. var droplist = Math.floor(Math.random() * $('#youridsir1 option').length);
This line repeats severeal times with id varying by the last digit. I would like to make this code more uniform, before an attempt to create a loop.

how to replace 

#youridsir1

with something like

[this.id]

?