NEW YORK (AP) _ Democrat Michael Dukakis won support in the California and New Jersey primaries from two groups whose support will be crucial in the November election - Reagan Democrats and Jesse Jackson backers.

Dukakis wrapped up his party's nomination with victories Tuesday in the two states, along with contests in Montana and New Mexico.

Exit polls after the races showed Dukakis maintaining the broad ideological appeal he has maintained throughout the later primaries. He even was rated favorably by a sizable share of Republicans.

The Massachusetts governor remained somewhat ill-defined in the eyes of voters; ABC News found that nearly a quarter of the Democrats in both states were not sure where to place him ideologically. Analysts said that could prove a plus or a minus.

''It's an indication he's run a moderate campaign,'' said ABC pollster John Brennan. ''It also indicates people haven't scrutinized him closely. He's all things to all people.''

While Dukakis paints himself as a moderate, therefore, the Republicans may find an opening to call him a liberal.

Still, the polls contained chiefly good news for Dukakis as he looks ahead to November.

CBS News-New York Times polls said about a quarter of the Democratic primary voters in both states supported President Reagan in 1984, and nearly two-thirds of them favored Dukakis over George Bush this year.

At the same time, a majority of the Democrats who supported Jackson said they would back Dukakis over Bush for president. And sizable shares of Republicans and Jackson voters alike viewed Dukakis favorably.

''Republicans are not turned off by Dukakis,'' said I.A. Lewis, pollster for The Los Angeles Times. Across the political spectrum, he added, ''Look at Jackson voters; they are not unfavorable to Dukakis. So it won't be so hard for them to bind up their wounds.''

Thirty-six percent of Jackson's voters in the Los Angeles Times' poll had a favorable opinion of Dukakis, to 32 percent unfavorable and 32 percent with no opinion. In the 1984 and 1980 Democratic primaries in California, backers of the losers were far more antagonistic toward the winners, Lewis noted.

ABC and CBS-Times polls found that more than 60 percent of Jackson's supporters in both states said they would vote for Dukakis over Bush in November. Although as many as 30 percent said they would not vote, ABC poll analyst Doug Muzzio said disappointed primary voters historically turn out in greater numbers in November than they indicate in the spring.

Among Republicans, the L.A. Times poll said 29 percent had a favorable opinion of Dukakis to 40 percent unfavorable and 31 percent with no opinion. Lewis said favorable ratings usually are far lower for an opposing party's candidate.

ABC poll results from New Jersey said Dukakis continued to appeal to Democrats across the ideological spectrum. He won majorities of liberals, moderates and conservatives, and 56 percent of all Democrats said his views were ''just about right'' as opposed to too liberal or too conservative.

Dukakis scored somewhat less strongly in California, where 49 percent of Democrats rated his views ''just about right.'' Liberals dominate the state party, and 19 percent of the Democrats rated Dukakis ''too conservative.'' That group voted overwhelmingly for Jackson.

Dukakis also won more committed support in New Jersey, where the CBS-Times poll found that 54 percent of his voters backed him strongly, more than in most earlier races. In California, 49 percent of Dukakis supporters said they had some reservations about him, to 38 percent who were strong.

Voters in both states cited experience and strong leadership as their chief reasons for supporting Dukakis, areas in which he has not been rated as strongly in the past, said CBS pollster Keating Holland. He said Dukakis' greater strength in New Jersey could reflect a regional bias for a fellow Northeasterner.

The exit polls showed a continuing racial division in the Democratic vote. Jackson won about a quarter of the white vote in California - one of his best showings among whites - but only 9 percent in New Jersey, one of his worst showings with whites. He got more than 90 percent of the black vote in both states.

ABC's polls had a margin of sampling error of five percentage points; the CBS-Times poll had a four-point margin, the L.A. Times poll, three points; NBC's, two points.