Code of Civil Procedure Article 316

Witnesses shall be examined separately. Notwithstanding, where the presiding judge considers it necessary, he/she may order a witness to be confronted by another witness or a party.A witness, without the permission of the presiding judge, may not leave the courthouse or other place of examination before the conclusion of the session.
中文原文 民事訴訟法第316條
訊問證人,應與他證人隔別行之。
但審判長認為必要時,得命與他證人或當事人對質。
證人在期日終竣前,非經審判長許可,不得離去法院或其他訊問之處所。

English translation for reference only; the Chinese text prevails. Not legal advice.