The dollar suffered another beating on Japan's foreign exchange yesterday despite an attempt by the Bank of Japan to support it, and worried government officials began demanding that the Carter administration act quickly to stem the currency's decline.

Meanwhile, news services reported the dollar rose to its highest rates in weeks in Europe, and gold prices, which have been riding high on the dollar's weakness, slumped.

Western European dealers could give no particular reason for the dollar's gain. But they said there is a growing feeling the dollar may have bottomed out.

The dollar gained sharply in trading in Zurich, Frankfurt and Paris.

In his news conference yesterday, President Carter said he will continue to intervene to curb "shocks" to the dollar in foreign currency markets when disorderly market conditions exist.

The federal Reserve Bank of New York, which acts for the Federal Reserve in foreign exchange currency dealings, reported Wednesday it bought the equivalent of $1.5 billion in foreign currencies in the November-January quarter to prop up the dollar.

Japanese Prime Minister Takeo Fukuda called the latest dollar loss against the yen "very grave" and told a parliamentary committee he is urging the United States to take effective actions to defend the dollar.

At the same time, however, he instructed ministers to search for emergency measures to prevent the yen from rising even higher against the dollar.

Those ministers let it be known they will press the Carter administration to act swiftly in bolstering the dollar, and they also prepared to clamp down on a sudden inflow of foreign money that has sent the yen rising to record highs this week.

In a move indicative of a stiffening attitude toward Washington, the governor of the Bank of Japan, Teicihiro Morinaga, said the problem is not that the yen is too high but that the dollar is too low. He said he would press the Carter administration to act quickly to stabilize the dollar.

After spurts of heavy trading, the yen closed yesterday at 233.60 to the dollar, another postwar high. That means that the dollar has now lost about one-fifth of its value against the yen in the past year. It closed at 235 on Wednesday.

When the market opened, the Bank of Japan intervented with large dollar purchases, hoping to stabilize the exchange rate at 235, but quickly bowed out when it became apparent that the selling pressures were too strong. In one five-minute period, more than $100 million was traded, an amount equal to a half-day of trading in nomal times.

Until this week, the rate had seemed to level off at about 240 to the dollar. Repeated intervention by the Bank of Japan on Wednesday and yesterday were not sufficient to hold back the investors who were switching from dollars to yen.

The buyers reportedly included many foreign banks, which fear the dollar will sink even lower, and domestic banks getting rid of dollars held by Japan's own trading companies.

"Nobody wants to be left holding dollars now," said one American banker in Tokyo.

The underlying reason for the decline was uncertainty about the American economy and the failure of the Carter administration to obtain passage of an energy program that would decrease U.S. oil imports and reduce its trade deficit.

Government and private economists predicted the yen's renewed appreciation will have a serious effect on Japan's economy, principally because it will make this country's exports more expensive overseas. There already has been an alarming rise in bankrupticies of small-and medium-sized firms which export products aborad.

In off-the-record sessions with Japanese reporters, officials indicated plans are under way to ask the United States to order the Federal Reserve Bank of New York to buy more dollars quickly. They also described plans to encourage Washington to make a $2 billion currency swap with Japan to shore up the dollar in Tokyo and elsewhere.

In domestic moves, the government reportedly was ready to place new foreign exchange restrictions on short-term foreign investments in Japan and to tighten reserve requirements on Yen deposits held in Japan by foreigners.

Fukuda also announced yesterday that the government would immediately begin increasing emergency imports, a move planned some time ago to reduce Japan's large trade surplus. He said the move would help to curtail the yen's appreciation.

He said that about $900 million worth of imports will be bought this month under the emergency program. One probable purchase is oil that Japan does not currently need but will be stockpiled in idle tankers for future use. The government is also considering establishing a company that would buy new aircraft abroad. Domestic airlines do not need the planes so they would be leased to underdeveloped countries.

In a related development, news services reported that an official of the Organization of Petroleum Exporting Countries and plans are being completed for a meeting of OPEC oil ministers in Geneva on April 3-4 to deal with losses in income resulting from the decline of the dollar.

A Saudi Arabian official announced however, that his country sees no need for an emergency meeting on increasing oil prices in view of the decline of the dollar.