In solving Ex 3.17 in Brezis's book of Functional Analysis, I come across below result.
Let $E$ be a locally convex Hausdorff t.v.s. and $I$ a set of indices. We endow $E^I$ with the product topology $\tau$. Then $(E^I, \tau)$ together with pointwise addition and scalar-multiplication is a locally convex Hausdorff t.v.s.
Could you have a check on my attempt? I posted my proof separately as an answer below, so I can accept my own answer and thus remove my question from unanswered list.
I have verified that $E^I$ is indeed a t.v.s. here. Let $\pi_i: E^I \to E, x \mapsto x_i$ be the canonical projection. Let $x \in E^I$ and $U$ be a neighborhood of $x$. There is a finite subset $J\subseteq I$ and a collection $(U_i)_{i \in J}$ such that $U_i$ is a neighborhood of $x_i$ and that $$ x \in V:= \bigcap_{i\in J} \pi_i^{-1}[U_i] \subseteq U. $$
Because $E$ is locally convex, we can pick such that $U_i$ is convex for all $i\in J$. Notice that $\pi_i$ is linear, so $V$ is convex. Next we fix $x,y\in E^I$ such that $x \neq y$. Then there is $j \in I$ such that $x_j \neq y_j$. Because $E$ is Hausdorff, there are neighborhoods $U_x$ of $x_j$ and $U_y$ of $y_j$ such that $U_x \cap U_y =\emptyset$. It follows that $\pi_j^{-1}[U_x]$ and $\pi_j^{-1}[U_y]$ are neighborhood of $x,y$ respectively such that $\pi_j^{-1}[U_x] \cap \pi_j^{-1}[U_y] = \emptyset$. This completes the proof.