The military salute of the right hand to the forehead was used at the beginning of the original pledge of allegiance. The military salute was held for the phrase “I pledge allegiance” and then the right arm extended straight outward toward the flag for the rest of the chant. Historic photographs are linked at http://rexcurry.net/pledge_military.html and at http://rexcurry.net/pledge2.html
The first description of the pledge by Francis Bellamy, author of the pledge, had the palm of the hand turned upward for the straight-armed gesture. The gesture changed in use, growing into the "Heil Hitler" appearance because of the military salute (palm down) extended casually straight toward the flag.
James Bailey Upham suggested to Bellamy part of the gesture (the straight-arm with the palm upward). Upham’s suggested gesture (palm up) was like saying “Here is the flag.” It was because of Bellamy’s alteration (the addition of the military salute) that the pledge evolved into the Nazi-style.
The Nazi-style salute was then repeated in early famous movies in fictionalized Roman scenes. The widespread use of the straight-arm salute in the USA and in movies led to its adoption later by the National Socialist German Workers’ Party (Nazi Party).
The straight-arm salute was not a Roman salute. That is a debunked myth.
Bellamy wrote the pledge with the military salute because Bellamy was a self-proclaimed national socialist who promoted “military socialism” (a Bellamy term) and he wanted government schools to create an “industrial army” (another Bellamy term) in order to nationalize the entire economy. That was the idea behind the pledge and a flag in every government school. It was the origin of the modern military-socialist complex.
Government schools teach that the pledge was created to sell flags to schools and Francis Bellamy is described as an advertising pioneer. That is a whitewashed piece of the whole story. A better description is that Bellamy was a propaganda pioneer, comparable to Leni Riefenstahl. That is one of many reasons why Francis Bellamy and his also-famous cousin Edward Bellamy are known as the "American Hitlers" and as the first "American Nazis." http://rexcurry.net/pledge1.html
The World is owed an apology by the USA and by anyone who thinks that the military-socialism and salute of the Nazis originated in Germany. An
American organization is lobbying for an official apology and is gaining support to set the record straight. http://rexcurry.net/pledgeapology.html