Backers of Ronald Reagan are crying foul at a change in the Illinois presidential primary law pushed through late Friday night by supporters of John B. Connally, with the help of Illinois Gov. James R. Thompson Jr. (R).

State Rep. Danold Totten (R), leader of the Reagan forces in Illinois, charged in a telephone interview yesterday that what he called the "wheeler-dealer" amendment is a "definite attempt by people not favourable to Reagan, including Gov. Thompson, to control the Illinois delegation,"

David Gilbert, Thompson's press secretary, said "I don't see how it hurts or helps any candidate," and reafffirmed Thompson's public postion of neutrality in the GOP presidential race.

The change in the law authorizes party committees to print presidential primary ballots that list the names of candidates for delegate without specifying their presidential preferences.

While Gilbert contended Thompson has not considered the bill, Don Adams, the Illinois Republican chairman, said he was confident that the governor would sign it into law and that the GOP state central committee would use it to ban candidate-identification of those seeking election as delegates.

An official of the Democratic National Committee said its rules would prevent the Illinois Democratic committee from taking advantage of the same provision.

The Illinois primary is March 18, and the 102 GOP delegates constitute the third-largest prize among all the states.

Adams said the change, which his committee had sought, was "certainly not meant as an anti-Reagan move." But others-including officials in the campaigns of Reagan's challengers-said the former California governor, who leads in preference polls of Republican voters would be a clear favorite in his native Illinois if voters knew which were his delegates.

Totten reported a pro-Connally stance among the bill's prime sponsors in the Illinois House and Senate. During the roll call, he said, Thompson's lieutenants were active in rounding up the votes that pushed it to passage by a five-vote margin. "Its purpose," he said, "is to smooth the way for a Connally-Thompson ticket."

GOP chairman Adams said that, without presidential names on the ballot, "the better-known party people should be elected."

In many cases, those party veterans will be allies or appointees of Thompson. But the change will also make it easier for Republican congressmen to be elected as uncommitted delegates. Although two Illinois representatives, Philip M. Crane and John B. Anderson, are presidential contenders, much of the state's congressional support is expected to go to George Bush or Senate Minority Leader Howard H. Baker Jr. (Tenn.). But Connally is expected to do well in lining up big-name GOP figures in Illinois, with or without Thompson's tacit help.

Adams said that because the Illinois primary comes so early, well-known politicans who want to be national convention delegates were forced under the old system to guess in early winter which presidential candidates might be viable contenders six months later. CAPTION: Picture, John B. Connally . . . friends in Springfield legislature