Nablus Mayor Bassam Shaka, who lost both legs in a bomb assassination attempt Monday, was taken by his family to Aman, Jordan, today for treatment of gangrene.

Doctors at Rafediya Hospital said poisonous substances in the explosives that detonated in Shaka's car had caused infection and that special treatement was needed. Shaka refused an offer by the military government of treatement in any Israeli hospital, and he was moved by ambulance from Nablus to the Damiya Bridge across the Jordan River.

There, he was met by a Jordanian helicopter, which transferred him to the King Hussein medical complex in Amman. Israeli officials gave assurances that Shaka would be permitted to return when his condition improves.

Ramallah Mayor Karim Khalaf, who lost a foot in a similar explosion Monday, was said to be in worsening condition at Ramallah Hospital, but there were no immediate plans to move him.

Mayors Elias Freij of Bethlehem and Rashad Shawa of Gaza, who had announced their resignations as a protest against the bombing, said they were bowing to requests from other mayors in the occupied territories and would remain on the job.

Meanwhile, a heavy Army presence continued in the occupied West Bank and in East Jerusalem today, which is the 13th anniversary of the 1967 Six-Day War. Arab stores in the territories remained open, but only because merchants were ordered by troops to disobey calls for a general strike.

Meanwhile, an Israeli military spokesman said Israeli forces overnight attacked Palestinian guerrilla bases near the south Lebanese port town of Sidon, wire services reported. The spokesman said several guerrillas had been killed or woulded but none of the Israeli raiders was hurt.