If I travel by train from Hong Kong to Shanghai, will I be allowed to leave Shanghai by air after visiting Jiangsu and Zhejiang?

english.shanghai.gov.cn

A: Yes. As long as you have a connecting ticket to a third country or region within 144 hours, you can enjoy the visa-free transit, regardless of whether you enter China by plane, train or ferry via the airports, railway stations or cruise terminals in Shanghai, Nanjing Lukou Airport in Jiangsu or Hangzhou Xiaoshan Airport in Zhejiang.

Additionally, you can exit from any of the mentioned ports to a third country or region.

 

Source: Shanghai Exit-Entry Border Inspection General Station