Several versions of this:
Salute the King (military salute)
Salute the queen (naval salute)
Salute the German submarine (thumb your nose)
A close variation
Salute the captain of the ship
sorry, sir, my finger slipped
Both of these go back to at least the 1940s, and could go back to about World War I.
In the 1970s in the States, it had morped to:
Salute the king
salute the queen
touch the dirty submarine (the third line here ended with touching one's butt).
Meanwhile, in the 70s, Iona Opie picked up this variation, which is said to go back to at least the 1950s:
I'm a girl guide dressed in blue
these are the duties I must do
salute to the captain
curtsey to the queen
show my knickers to the football team
Opie notes that on the 3rd, 4th and 5th lines, one saluted, curtseyed, and stood on one's head, respectively (judging by the pictures in The Singing Game, girls still wore dresses almost exclusively in the UK at the time, making standing on one's head slightly risque). I have to wonder if this made it to the states as a rhyme about cheerleaders - it would have been easy enough to Americanize. There are American versions that end with "turn my back on the boy in green."
Similar to this is one that went around in the 1940s:
This is how the king salutes (salute)
This is how Hitler salutes (raise arm)
this is how a dog salutes! (lift leg)
These went around in many, many variations, sometimes changing names to include modern and topical references. Put yours in the comments!
See also: Charlie Chaplin went to France